diff options
author | Thomas Kluyver <takowl@gmail.com> | 2018-06-08 19:28:37 (GMT) |
---|---|---|
committer | Brett Cannon <brettcannon@users.noreply.github.com> | 2018-06-08 19:28:37 (GMT) |
commit | 11a896652ee98aa44e59ed25237f9efb56635dcf (patch) | |
tree | 1f63d8ddb6436d64db43ae7147bddbd994cd06a8 /Misc | |
parent | 3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476 (diff) | |
download | cpython-11a896652ee98aa44e59ed25237f9efb56635dcf.zip cpython-11a896652ee98aa44e59ed25237f9efb56635dcf.tar.gz cpython-11a896652ee98aa44e59ed25237f9efb56635dcf.tar.bz2 |
bpo-33375: Get filename for warnings from frame.f_code.co_filename (GH-6622)
More consistent with how other parts of Python find the filename (e.g. tracebacks and pdb).
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-04-28-08-11-35.bpo-33375.Dbq1fz.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-04-28-08-11-35.bpo-33375.Dbq1fz.rst b/Misc/NEWS.d/next/Library/2018-04-28-08-11-35.bpo-33375.Dbq1fz.rst new file mode 100644 index 0000000..f3f9d2a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-28-08-11-35.bpo-33375.Dbq1fz.rst @@ -0,0 +1,4 @@ +The warnings module now finds the Python file associated with a warning from +the code object, rather than the frame's global namespace. This is +consistent with how tracebacks and pdb find filenames, and should work +better for dynamically executed code. |