]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-122981: Fix inspect.getsource() for generated classes with Python base classes... 123156/head
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 20 Aug 2024 17:10:15 +0000 (20:10 +0300)
committerGitHub <noreply@github.com>
Tue, 20 Aug 2024 17:10:15 +0000 (20:10 +0300)
commitf88c14d412522587085ae039ebe70b91d5b4e226
treeaa917277e3ab6c649b291ad2cba15817167e7af8
parentbb1d30336e83837d4191a016107fd501cd230328
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.
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]