From 0101ae4b97ae42b94bf39238c522eba3ba347f85 Mon Sep 17 00:00:00 2001
From: Sebastian Rieger <sebastian.rieger@informatik.hs-fulda.de>
Date: Wed, 27 Sep 2023 10:53:18 +0200
Subject: [PATCH] updated deps for flask-restless-ng and SQLAlchemy

---
 faafo/faafo/api/service.py |  8 ++++----
 faafo/requirements.txt     | 35 +++++++++++++++++++++++------------
 2 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/faafo/faafo/api/service.py b/faafo/faafo/api/service.py
index 2ce438a..f0c7178 100644
--- a/faafo/faafo/api/service.py
+++ b/faafo/faafo/api/service.py
@@ -101,7 +101,7 @@ class Fractal(db.Model):
 with app.app_context():
     db.create_all()
 
-manager = APIManager(app, flask_sqlalchemy_db=db)
+manager = APIManager(app=app, session=db.session)
 connection = Connection(CONF.transport_url)
 
 
@@ -110,8 +110,8 @@ connection = Connection(CONF.transport_url)
 @app.route('/index/<int:page>', methods=['GET'])
 def index(page=1):
     fractals = Fractal.query.filter(
-        (Fractal.checksum != None) & (Fractal.size != None)).paginate(  # noqa
-            page, 5, error_out=False)
+        (Fractal.checksum != None) & (Fractal.size != None)).paginate(
+            page=page, per_page=5)
     return flask.render_template('index.html', fractals=fractals)
 
 
@@ -147,6 +147,6 @@ def main():
     with app.app_context():
         manager.create_api(Fractal, methods=['GET', 'POST', 'DELETE', 'PUT'],
                            postprocessors={'POST': [generate_fractal]},
-                           exclude_columns=['image'],
+                           exclude=['image'],
                            url_prefix='/v1')
     app.run(host=CONF.listen_address, port=CONF.bind_port)
diff --git a/faafo/requirements.txt b/faafo/requirements.txt
index c996f94..2f9abf2 100644
--- a/faafo/requirements.txt
+++ b/faafo/requirements.txt
@@ -1,20 +1,31 @@
-pbr>=1.6
+#pbr>=1.6
+pbr
 pytz
 positional
 iso8601
-anyjson>=0.3.3
-eventlet>=0.17.4
+#anyjson>=0.3.3
+anyjson
+#eventlet>=0.17.4
+eventlet
 #PyMySQL>=0.6.2,<0.7  # 0.7 design change breaks faafo, MIT License
-PyMySQL>=0.6.2
+#PyMySQL>=0.6.2
+PyMySQL
 #SQLAlchemy>1.3,<1.4  # 1.4 breaks faafo list
-SQLAlchemy>=2.0.16
-Pillow==2.4.0 # MIT
-requests>=2.5.2
+#SQLAlchemy>=2.0.16
+SQLAlchemy
+#Pillow==2.4.0 # MIT
+Pillow
+#requests>=2.5.2
+requests
 Flask-Bootstrap
 Flask
-flask-restless
+flask-restless-ng
 flask-sqlalchemy
-oslo.config>=2.3.0  # Apache-2.0
-oslo.log>=1.8.0  # Apache-2.0
-PrettyTable>=0.7,<0.8
-kombu>=3.0.7
+#oslo.config>=2.3.0  # Apache-2.0
+#oslo.log>=1.8.0  # Apache-2.0
+#PrettyTable>=0.7,<0.8
+#kombu>=3.0.7
+oslo.config
+oslo.log
+PrettyTable
+kombu
\ No newline at end of file
-- 
GitLab