Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
As reported in#60074, sincePyType_FromMetaclass was added, other functions from thePyType_FromSpec family 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_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
- gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. #103972
- gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL #105386
- [3.12] gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386) #105697
- gh-103968: What's New: Add porting hints for PyType_From with metaclasses #105698
- [3.12] gh-103968: What's New: Add porting hints for PyType_From with metaclasses (GH-105698) #106619
Metadata
Metadata
Assignees
Labels
Projects
Status
Done