Skip to content

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

@utnapischtim

Description

@utnapischtim

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions