deprecat Decorator
Python @deprecat
decorator to deprecate old python classes, functions or methods.
Installation
pip install deprecat
Usage
To use this, decorate your deprecated function with @deprecat decorator:
from deprecat import deprecat
@deprecat
def some_old_function(x, y):
return x + y
You can also decorate a class or a method:
from deprecated import deprecat
class SomeClass(object):
@deprecat
def some_old_method(self, x, y):
return x + y
@deprecat
class SomeOldClass(object):
pass
You can give a "reason" message to help the developer to choose another function/class:
from deprecat import deprecat
@deprecat(reason="use another function")
def some_old_function(x, y):
return x + y
Authors
The authors of this library are: Marcos CARDOSO, and Laurent LAPORTE. The original code was made in this StackOverflow post by Leandro REGUEIRO, Patrizio BERTONI, and Eric WIESER.
Modified and now maintained by: Meenal Jhajharia