Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Dependencies to make the package compatible with Flask >=2.3 #170

Open
utnapischtim opened this issue Aug 31, 2023 · 0 comments
Open
Assignees

Comments

@utnapischtim
Copy link
Contributor

utnapischtim commented Aug 31, 2023

General

Flask 2.2 deprecated the variable _app_ctx_stack (and a lot of other stuff). Flask 2.3 removed most of the things 2.2 deprecated. _app_ctx_stack was heavily used in a lot of packages so also in the SQLAlchemy packages. Only the newest versions remove this usage so all dependencies have to be updated.

The deprecation warning looks like:

env/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py:302: DeprecationWarning: '_app_ctx_stack' is deprecated and will be removed in Flask 2.3. Use 'g' to store data, or 'app_ctx' to access the current context.
  queries = _app_ctx_stack.top.sqlalchemy_queries

Problems

  • With SQLAlchemy 2.0 the definition of a Session changed slightly

NOTES

@utnapischtim utnapischtim self-assigned this Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant