This repository was archived by the owner on May 7, 2024. It is now read-only.
This repository was archived by the owner on May 7, 2024. It is now read-only.
_app_ctx_stack.top
is deprecated and will be removed in Flask 2.3 #16
Open
Description
I'm getting the following warning:
venv/lib/python3.9/site-packages/flask_sqlalchemy_session/__init__.py:11
venv/lib/python3.9/site-packages/flask_sqlalchemy_session/__init__.py:11
venv/lib/python3.9/site-packages/flask_sqlalchemy_session/__init__.py:11:
DeprecationWarning: '_app_ctx_stack' is deprecated and will be removed in Flask 2.3.
from flask import _app_ctx_stack, current_app
These are the relevant notes from Flask's 2.2.0 release notes:
- The app and request contexts are managed using Python context vars directly rather than Werkzeug’s LocalStack. This should result in better performance and memory use. #4682
- Extension maintainers, be aware that _app_ctx_stack.top and _request_ctx_stack.top are deprecated. Store data on g instead using a unique prefix, like g._extension_name_attr.
Metadata
Metadata
Assignees
Labels
No labels