This is a feature request (I think): I would like deprecated to be able to yield warnings on a method call, even when overriding the implementation in a subclass. In particular, I would like to be able to deprecate abstract methods.
Expected Behavior
Running…
from deprecated import deprecated
class Parent:
@deprecated(reason='try not to laugh')
def fun(self, arg):
raise NotImplementedError()
class Child(Parent):
def fun(self, arg):
print(arg)
print('yaye!')
some = Child()
some.fun('whoops')
…I would like to see…
DeprecationWarning: Call to deprecated method fun. (try not to laugh)
some.fun('whoops')
whoops
yaye!
Actual Behavior
However, since the method is overriden, I can see no warning:
Environment
- Python version: 3.9
- Deprecated version: 1.2.14
This is a feature request (I think): I would like
deprecatedto be able to yield warnings on a method call, even when overriding the implementation in a subclass. In particular, I would like to be able to deprecate abstract methods.Expected Behavior
Running…
…I would like to see…
Actual Behavior
However, since the method is overriden, I can see no warning:
Environment