]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45383: Get metaclass from bases in PyType_From* (GH-28748)
authorSebastian Berg <sebastian@sipsolutions.net>
Thu, 9 Jun 2022 15:11:08 +0000 (08:11 -0700)
committerGitHub <noreply@github.com>
Thu, 9 Jun 2022 15:11:08 +0000 (17:11 +0200)
commit7fef8476629775c790f522a073ab279887bd81f9
tree5a4e5e7c744da6322caf13fe0df5cecf787924ce
parenta5ba0f4ebca5020f6c77718a20663e0ac6e194ac
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>
Doc/c-api/type.rst
Misc/NEWS.d/next/C API/2021-10-05-21-59-43.bpo-45383.TVClgf.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Objects/typeobject.c