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

make calling_context more accurate #493

Closed
wants to merge 1 commit into from

Conversation

blurrcat
Copy link

As detailed in pallets-eco/flask-debugtoolbar#96, the current logic for generating the calling context often fails unnecessarily.

Specifically, when a project is structured like the following,

project
├── project
│   ├── app.py
│   └── views.py
└── setup.py

and the flask application is defined by app = Flask(__name__) in app.py, the calling context will be "unknown" if the query is issued from somewhere other than app.py. This is because now app_path is project.app but the relevant frame that issues the query might be project.views.

The updated logic matches the frame with the top level package of the app_path.

@rsyring rsyring added this to the Unknown milestone Mar 9, 2019
@davidism
Copy link
Member

Fixed in #1087

@davidism davidism closed this Sep 18, 2022
@davidism davidism modified the milestones: Unsure, 3.0 Sep 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants