In the abc module (https://docs.python.org/3/library/abc.html) the following decorators have been deprecated since Python 3.3: - abstractclassmethod - abstractstaticmethod - abstractproperty But if you run the following example code using Python 3.5.2 with -Werror, no DeprecationWarnings are thrown. Throwing DeprecationWarnings will help make it more clear that these properties should not be used. PyCharm, for example, will strikethrough the usage of methods that throw DeprecationWarning so that even new users will be notified quickly even if they don't run with -Werror. import abc class Base(abc.ABC): @abc.abstractclassmethod def abstract_class(cls): pass @abc.abstractstaticmethod def abstract_static(): pass @abc.abstractproperty def abstract_property(self): pass class Child(Base): @classmethod def abstract_class(cls): print('Abstract class method') @staticmethod def abstract_static(): print('Abstract static method') @property def abstract_property(self): return 'Abstract property' child = Child() child.abstract_class() child.abstract_static() print(child.abstract_property)
Not all features deprecated in the source should be deprecated in the code. May be reasons for not doing this in the code. Adding the deprecation in maintained releases can introduce a regression. It seems to me that these decorators are not broken. They is just other, more preferable way to write the same, with the combination of other decorators.
Right, these are in the "Don't use them in new code, but we have absolutely no plans to actually remove them" documentation-only category of deprecation warning. However, I'm converting this to a documentation enhancement request, as the documentation could make that status clearer by moving them to a separate "Legacy builtin decorator subclasses" section at the end of https://docs.python.org/3/library/abc.html Then that section can *start* with the information on simply applying the builtin decorators on top of the abc.abstractproperty() decorator, before moving on to document the available subclasses.