Skip to content

gh-73055: Set up inheritance registry in ABCMeta.__init__. - #16613

Closed
serhiy-storchaka wants to merge 3 commits into
python:mainfrom
serhiy-storchaka:abcmeta-init
Closed

serhiy-storchaka wants to merge 3 commits into
python:mainfrom
serhiy-storchaka:abcmeta-init

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Oct 7, 2019 •

Copy link
Copy Markdown
Member

Move setting up inheritance registry from ABCMeta.__new__ to
ABCMeta.__init__.
This makes the __module__ attribute be properly set for types
created by calling ABCMeta().

https://bugs.python.org/issue28869

Move setting up inheritance registry from ABCMeta.__new__ to
ABCMeta.__init__.
This makes the __module__ attribute be properly set for types
created by calling ABCMeta().

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strictly speaking not 100% backwards compatible change. Some subclasses of ABCMeta may override __new__ and may depend on the fact that abstract status and/or caches are ready after calling super().__new__(...) (IIRC this was the situation with typing.GenericMeta at some point when it existed).

So I would not backport this to older versions (also maybe this behaviour should be clarified in the docs), otherwise looks good.

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has merge conflicts so cannot be merged.

@bedevere-bot

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 7, 2026
@serhiy-storchaka serhiy-storchaka changed the title bpo-28869: Set up inheritance registry in ABCMeta.__init__. gh-73055: Set up inheritance registry in ABCMeta.__init__. Aug 12, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 14, 2026
@ambv

ambv commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This PR is blocked on its author, has not been touched by a human in more than 3 years, and no longer merges cleanly. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer on gh-73055.

@ambv ambv closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants