Skip to content

Allow ABCMeta in PyType_FromMetaclass #137770

@WildCard65

Description

@WildCard65

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

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions