As reported in #60074, since PyType_FromMetaclass was added, other functions from the PyType_FromSpec family refuse to create classes whose metaclass has a non-default tp_new. IMO this is the correct default behaviour -- we don't have the arguments to call tp_new with, and skipping it may be dangerous.
Nevertheless, it's a backwards-incompatible change. It should only be made after a deprecation period.
I'm working on a fix.
Linked PRs
As reported in #60074, since
PyType_FromMetaclasswas added, other functions from thePyType_FromSpecfamily refuse to create classes whose metaclass has a non-defaulttp_new. IMO this is the correct default behaviour -- we don't have the arguments to calltp_newwith, and skipping it may be dangerous.Nevertheless, it's a backwards-incompatible change. It should only be made after a deprecation period.
I'm working on a fix.
Linked PRs