Skip to content

Schedule removal for deprecated abc decorators #149609

@aiwonderland

Description

@aiwonderland

Proposal:

Remove deprecated abc.abstractclassmethod, abc.abstractstaticmethod and abc.abstractproperty for 3.16.
or maybe and an warn:

import warnings
# codes ...
class abstractproperty(property):
    __isabstractmethod__ = True

    def __init__(self, fget=None, fset=None, fdel=None, doc=None):
        warnings.warn(
            "abc.abstractproperty is deprecated and will be removed in Python 3.16. "
            "Use @property with @abstractmethod instead.",
            FutureWarning,
            stacklevel=2
        )
        super().__init__(fget, fset, fdel, doc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions