Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-116093: ABCMeta.__subclasscheck__ now initializes cls if it is not yet initialized#119719

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
blhsing wants to merge5 commits intopython:main
base:main
Choose a base branch
Loading
fromblhsing:fix-abc-init-subclasscheck

Conversation

blhsing
Copy link
Contributor

ABCMeta.__subclasscheck__ now initializes cls if it is not yet initialized

This fixes the issues reported ingh-82266,gh-116093 andgh-119699.

Previously callingissubclass within__init_subclass__ may result in the ABC cache of the parent class of the subclass being instantiated to be mutated since the cache of the subclass is not yet initialized.

This is fixed by forcing__subclasscheck__ to initialize the current class if it is found to not have been initialized.

treykeown reacted with thumbs up emoji
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
@treykeown
Copy link

Wanted to +1 this, anything I can do to help it get merged?

@treykeown
Copy link

Any reason this is blocked?

@blhsing
Copy link
ContributorAuthor

@ncoghlan Can you help review this PR, as you were the reviewer of theoriginal implementation of__init_subclass__? Thanks!

Made references to methods proper links in news.
@treykeown
Copy link

Hey folks - still hacking around this bug. Anything I can do to help get this moving?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Eclips4Eclips4Eclips4 left review comments

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@blhsing@treykeown@Eclips4

[8]ページ先頭

©2009-2025 Movatter.jp