Skip to content

Commit a829068

Browse files
committed
Attempt to migrate to connexion 2.15
1 parent 233f9aa commit a829068

File tree

7 files changed

+8
-18
lines changed

7 files changed

+8
-18
lines changed

airflow/providers/fab/provider.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ versions:
4545

4646
dependencies:
4747
- apache-airflow>=2.9.0
48-
- flask>=2.2,<2.3
4948
# We are tightly coupled with FAB version as we vendored-in part of FAB code related to security manager
5049
# This is done as part of preparation to removing FAB as dependency, but we are not ready for it yet
5150
# Every time we update FAB version here, please make sure that you review the classes and models in

airflow/utils/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ def _get_flask_db(sql_database_uri):
764764
flask_app.config["SQLALCHEMY_DATABASE_URI"] = sql_database_uri
765765
flask_app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
766766
db = SQLAlchemy(flask_app)
767-
AirflowDatabaseSessionInterface(app=flask_app, db=db, table="session", key_prefix="")
767+
AirflowDatabaseSessionInterface(app=flask_app, client=db, table="session", key_prefix="")
768768
return db
769769

770770

airflow/www/extensions/init_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def make_session_permanent():
4444
elif selected_backend == "database":
4545
app.session_interface = AirflowDatabaseSessionInterface(
4646
app=app,
47-
db=None,
47+
client=None,
4848
permanent=permanent_cookie,
4949
# Typically these would be configurable with Flask-Session,
5050
# but we will set them explicitly instead as they don't make

airflow/www/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from flask import request
2020
from flask.sessions import SecureCookieSessionInterface
21-
from flask_session.sessions import SqlAlchemySessionInterface
21+
from flask_session.sqlalchemy import SqlAlchemySessionInterface
2222

2323

2424
class SessionExemptMixin:

dev/breeze/tests/test_packages.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def test_find_matching_long_package_name_bad_filter():
158158
"apache-airflow>=2.9.0",
159159
"flask-appbuilder==4.5.2",
160160
"flask-login>=0.6.2",
161-
"flask>=2.2,<2.3",
162161
"google-re2>=1.0",
163162
"jmespath>=0.7.0",
164163
""",
@@ -171,7 +170,6 @@ def test_find_matching_long_package_name_bad_filter():
171170
"apache-airflow>=2.9.0.dev0",
172171
"flask-appbuilder==4.5.2",
173172
"flask-login>=0.6.2",
174-
"flask>=2.2,<2.3",
175173
"google-re2>=1.0",
176174
"jmespath>=0.7.0",
177175
""",
@@ -184,7 +182,6 @@ def test_find_matching_long_package_name_bad_filter():
184182
"apache-airflow>=2.9.0b0",
185183
"flask-appbuilder==4.5.2",
186184
"flask-login>=0.6.2",
187-
"flask>=2.2,<2.3",
188185
"google-re2>=1.0",
189186
"jmespath>=0.7.0",
190187
""",

generated/provider_dependencies.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@
553553
"apache-airflow>=2.9.0",
554554
"flask-appbuilder==4.5.2",
555555
"flask-login>=0.6.2",
556-
"flask>=2.2,<2.3",
557556
"google-re2>=1.0",
558557
"jmespath>=0.7.0"
559558
],

hatch_build.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
"pytest-rerunfailures>=13.0",
267267
"pytest-timeouts>=1.2.1",
268268
"pytest-xdist>=3.5.0",
269-
"pytest>=8.2,<9",
269+
"pytest>=8.2,<8.3",
270270
"requests_mock>=1.11.0",
271271
"time-machine>=2.13.0",
272272
"wheel>=0.42.0",
@@ -422,7 +422,7 @@
422422
# The usage was added in #30596, seemingly only to override and improve the default error message.
423423
# Either revert that change or find another way, preferably without using connexion internals.
424424
# This limit can be removed after https://github.com/apache/airflow/issues/35234 is fixed
425-
"connexion[flask]>=2.14.2,<3.0",
425+
"connexion==2.15.0rc1",
426426
"cron-descriptor>=1.2.24",
427427
"croniter>=2.0.2",
428428
"cryptography>=41.0.0",
@@ -435,12 +435,9 @@
435435
"flask-caching>=2.0.0",
436436
# Flask-Session 0.6 add new arguments into the SqlAlchemySessionInterface constructor as well as
437437
# all parameters now are mandatory which make AirflowDatabaseSessionInterface incompatible with this version.
438-
"flask-session>=0.4.0,<0.6",
438+
"flask-session>=0.6",
439439
"flask-wtf>=1.1.0",
440-
# Flask 2.3 is scheduled to introduce a number of deprecation removals - some of them might be breaking
441-
# for our dependencies - notably `_app_ctx_stack` and `_request_ctx_stack` removals.
442-
# We should remove the limitation after 2.3 is released and our dependencies are updated to handle it
443-
"flask>=2.2.1,<2.3",
440+
"flask>=2,<4",
444441
"fsspec>=2023.10.0",
445442
'google-re2>=1.0;python_version<"3.12"',
446443
'google-re2>=1.1;python_version>="3.12"',
@@ -494,9 +491,7 @@
494491
# Universal Pathlib 0.2.4 adds extra validation for Paths and our integration with local file paths
495492
# Does not work with it Tracked in https://github.com/fsspec/universal_pathlib/issues/276
496493
"universal-pathlib>=0.2.2,!=0.2.4",
497-
# Werkzug 3 breaks Flask-Login 0.6.2, also connexion needs to be updated to >= 3.0
498-
# we should remove this limitation when FAB supports Flask 2.3 and we migrate connexion to 3+
499-
"werkzeug>=2.0,<3",
494+
"werkzeug>=3,<4",
500495
]
501496

502497

0 commit comments

Comments
 (0)