FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. by encukou · Pull Request #103972 · python/cpython · GitHub

/ cpython Public

gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. - #103972

Merged
encukou merged 4 commits into
python:mainfrom
encukou:fromspec-metaclass-deprecation
May 3, 2023
Merged

gh-103968: Deprecate creating heap types whose metaclass has custom tp_new.#103972
encukou merged 4 commits into
python:mainfrom
encukou:fromspec-metaclass-deprecation

Conversation

encukou commented Apr 28, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

(That's a mouthful of an edge case!)

…stom tp_new.

(That's a mouthful of an edge case!)
Comment thread Doc/whatsnew/3.12.rst Outdated
Comment thread Doc/whatsnew/3.12.rst Outdated
Comment thread Doc/c-api/type.rst
Comment on lines +262 to +265
(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.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This could be nested in a .. deprecated:: 3.12 block I suppose? And below.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Comment thread Objects/typeobject.c
Comment thread Objects/typeobject.c

encukou commented May 3, 2023

Copy link
Copy Markdown
Member Author

Thank you!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL