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

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

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Aug 14, 2024

Look up __firstlineno__ only in the class' dict, without searching in base classes.

…ython base classes

Look up __firstlineno__ only in the class' dict, without searching in
base classes.
@serhiy-storchaka serhiy-storchaka merged commit f88c14d into python:main Aug 20, 2024
34 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 20, 2024
…ython base classes (pythonGH-123001)

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Aug 20, 2024

GH-123182 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Aug 20, 2024
@serhiy-storchaka serhiy-storchaka deleted the inspect-getsource branch August 20, 2024 18:22
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
…ython base classes (pythonGH-123001)

Look up __firstlineno__ only in the class' dict, without searching in
base classes.
Yhg1s pushed a commit that referenced this pull request Sep 2, 2024
…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 f88c14d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.

1 participant