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

flask: _app_ctx_stack is deprecated #482

Closed
zeha opened this issue Aug 10, 2022 · 3 comments
Closed

flask: _app_ctx_stack is deprecated #482

zeha opened this issue Aug 10, 2022 · 3 comments

Comments

@zeha
Copy link

zeha commented Aug 10, 2022

Is your feature request related to a problem? Please describe.

Flask 2.2 has deprecated app_ctx_stack.

Describe the solution you'd like

flask_client integration should ideally load without deprecation warnings.

Describe alternatives you've considered

None yet.

Additional context

https://flask.palletsprojects.com/en/2.2.x/changes/?highlight=_app_ctx_stack

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](https://github.com/pallets/flask/pull/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.
@jeffsawatzky
Copy link

Would be nice to have this fix back ported to 0.15 as well since we are currently on that and it will take some effort to upgrade to v1.0 (with the breaking changes there)

lepture added a commit that referenced this issue Sep 25, 2022
@lepture
Copy link
Owner

lepture commented Sep 25, 2022

fixed in cd66b36

@lepture lepture closed this as completed Oct 15, 2022
@jeffsawatzky
Copy link

@lepture Thanks for the fix! Any idea when 1.2.0 will be released with this?

coopfeathy added a commit to coopfeathy/authlib-django that referenced this issue Dec 11, 2022
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

3 participants