mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386)
This commit is contained in:
parent
58f0bda341
commit
2b90796be6
5 changed files with 53 additions and 9 deletions
|
@ -258,7 +258,7 @@ The following functions and structs are used to create
|
|||
(or *Py_tp_base[s]* slots if *bases* is ``NULL``, see below).
|
||||
|
||||
Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not
|
||||
supported.
|
||||
supported, except if ``tp_new`` is ``NULL``.
|
||||
(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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue