-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Currently Python 3.14 will deny any metaclass that implements tp_new, which ABCMeta does.
My suggestion is to add special logic in PyType_FromMetaclass that if the metaclass is ABCMeta or a subtype uses its tp_new instead of custom that it adds the abstract flag, and calls the method that calculates abstractmethods attribute.
Currently there is logic in CPython to mark native methods as abstract.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement