-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. #103972
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
Conversation
…stom tp_new. (That's a mouthful of an edge case!)
(For backwards compatibility, other ``PyType_From*`` functions allow | ||
such metaclasses. They ignore ``tp_new``, which may result in incomplete | ||
initialization. This is deprecated and in Python 3.14+ such metaclasses will | ||
not be supported.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be nested in a .. deprecated:: 3.12
block I suppose? And below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mentioned in .. versionchanged:: 3.12
in the affected functions.
Their docs are just Equivalent to ``PyType_FromMetaclass(NULL, NULL, arg, NULL, NULL)``
and a bunch of change notes, so the PyType_FromMetaclass
docs need this parenthetical to be complete.
Co-authored-by: Barney Gale <[email protected]>
Thank you! |
(That's a mouthful of an edge case!)