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

bpo-33375: Get filename for warnings from frame.f_code.co_filename #6622

Merged
merged 3 commits into from
Jun 8, 2018

Conversation

takluyver
Copy link
Contributor

@takluyver takluyver commented Apr 28, 2018

This needs fewer fallbacks than looking at frame.f_globals['__file__'], it's more consistent with how other pieces of Python (tracebacks, pdb) find code from a frame, and it works better for interactive interpreters like IPython, where many fragments of code share the same global namespace.

https://bugs.python.org/issue33375

Fallbacks are no longer needed for when mod.__file__ is unset
@brettcannon brettcannon self-requested a review May 3, 2018 19:55
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

Successfully merging this pull request may close these issues.

4 participants