]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-122981: Fix inspect.getsource() for generated classes with Python base...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Sep 2024 11:07:08 +0000 (13:07 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Sep 2024 11:07:08 +0000 (13:07 +0200)
commit2b4c31d87d6fe9ec7cdc88eb6139ce9370666739
tree8cb12a16715991260b3cd0aadac5828639980293
parent8b6dd92db78cd2c0170e30d9e2fd2851b7f60b13
[3.13] gh-122981: Fix inspect.getsource() for generated classes with Python base classes (GH-123001) (#123182)

gh-122981: Fix inspect.getsource() for generated classes with Python base classes (GH-123001)

Look up __firstlineno__ only in the class' dict, without searching in
base classes.
(cherry picked from commit f88c14d412522587085ae039ebe70b91d5b4e226)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/inspect.py
Lib/test/test_inspect/inspect_fodder2.py
Lib/test/test_inspect/test_inspect.py
Misc/NEWS.d/next/Library/2024-08-14-10-41-11.gh-issue-122981.BHV0Z9.rst [new file with mode: 0644]