diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-09 15:11:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 15:11:08 (GMT) |
commit | 7fef8476629775c790f522a073ab279887bd81f9 (patch) | |
tree | 5a4e5e7c744da6322caf13fe0df5cecf787924ce /Misc | |
parent | a5ba0f4ebca5020f6c77718a20663e0ac6e194ac (diff) | |
download | cpython-7fef8476629775c790f522a073ab279887bd81f9.zip cpython-7fef8476629775c790f522a073ab279887bd81f9.tar.gz cpython-7fef8476629775c790f522a073ab279887bd81f9.tar.bz2 |
bpo-45383: Get metaclass from bases in PyType_From* (GH-28748)
This checks the bases of of a type created using the FromSpec
API to inherit the bases metaclasses. The metaclass's alloc
function will be called as is done in `tp_new` for classes
created in Python.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/C API/2021-10-05-21-59-43.bpo-45383.TVClgf.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2021-10-05-21-59-43.bpo-45383.TVClgf.rst b/Misc/NEWS.d/next/C API/2021-10-05-21-59-43.bpo-45383.TVClgf.rst new file mode 100644 index 0000000..ca1b7a4 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-10-05-21-59-43.bpo-45383.TVClgf.rst @@ -0,0 +1,3 @@ +The :c:func:`PyType_FromSpec` API will now find and use a metaclass +based on the provided bases. +An error will be raised if there is a metaclass conflict. |