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

import issue with flask-3.0.0 #69

Open
kelvin-j-li opened this issue Oct 3, 2023 · 1 comment
Open

import issue with flask-3.0.0 #69

kelvin-j-li opened this issue Oct 3, 2023 · 1 comment

Comments

@kelvin-j-li
Copy link

Traceback (most recent call last):
...
from flask_track_usage import TrackUsage
File "/opt/homebrew/lib/python3.11/site-packages/flask_track_usage/init.py", line 43, in
from flask import _request_ctx_stack, g
ImportError: cannot import name '_request_ctx_stack' from 'flask' (/opt/homebrew/lib/python3.11/site-packages/flask/init.py)

The above import error is caused by removing the deprecated code got removed from flask-3.0.0:

pallets/flask#5223

_app_ctx_stack and _request_ctx_stack are removed as places to store custom data in favor of g. The deprecation period was already extended from 2.3.

@kelvin-j-li
Copy link
Author

kelvin-j-li commented Nov 9, 2023

created the pull requested:

ad786a1

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