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

'_request_ctx_stack' is deprecated and will be removed in Flask 2.3 #201

Closed
jscooksey opened this issue Apr 25, 2023 · 3 comments
Closed

Comments

@jscooksey
Copy link

Appreciate this is a waning not a failure. Just thought Id log it as I cant see it at this point.
Im getting this while using pytest, under normal flak run it doesn't throw the warning

venv/lib/python3.9/site-packages/flask_debugtoolbar/__init__.py:5
 /......./venv/lib/python3.9/site-packages/flask_debugtoolbar/__init__.py:5: DeprecationWarning:
  
  '_request_ctx_stack' is deprecated and will be removed in Flask 2.3.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
@jeffwidman
Copy link
Member

Hmm, this was fixed in #183

What's your entrypoint command? It must be doing something that causes:

if version_builder.parse(flask.__version__) >= version_builder.parse("2.2.0")

to be false.

@jeffwidman
Copy link
Member

I'm going to close, as I don't think there's much to do here, and this will go away once we drop support for flask versions < 2.2.

Happy to accept a PR if you end up wanting to tweak the if statement.

@jeffwidman jeffwidman reopened this May 24, 2023
@jeffwidman jeffwidman closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2023
@leducvin
Copy link

leducvin commented Nov 9, 2023

'_request_ctx_stack' is now removed in Flask 3.0.0, and flask-debugtoolbar 0.13.1 still tries to import it.

see:
https://flask.palletsprojects.com/en/3.0.x/changes/
https://github.com/pallets/flask/pull/5223/files

from flask.globals import _request_ctx_stack

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants