]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-86291: linecache: get module name from __spec__ if available (GH-22908)
authorEugene Toder <eltoder@users.noreply.github.com>
Tue, 20 Feb 2024 16:47:41 +0000 (11:47 -0500)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2024 16:47:41 +0000 (16:47 +0000)
commite976baba99a5c243ff3a3b5ef2fd14608a398338
tree7e9288462d2a1472092f247e7ec4944bd1f952c4
parent937d2821501de7adaa5ed8491eef4b7f3dc0940a
gh-86291: linecache: get module name from __spec__ if available (GH-22908)

This allows getting source code for the __main__ module when a custom
loader is used.
Lib/linecache.py
Lib/test/test_linecache.py
Misc/NEWS.d/next/Library/2020-12-15-22-30-49.bpo-42125.UGyseY.rst [new file with mode: 0644]