Deprecated
Python @deprecated decorator to deprecate old python classes, functions or methods.
Install / Use
/learn @laurent-laporte-pro/DeprecatedREADME
Deprecated Decorator
Python @deprecated decorator to deprecate old python classes, functions or methods.
Installation
pip install Deprecated
Usage
To use this, decorate your deprecated function with @deprecated decorator:
from deprecated import deprecated
@deprecated
def some_old_function(x, y):
return x + y
You can also decorate a class or a method:
from deprecated import deprecated
class SomeClass(object):
@deprecated
def some_old_method(self, x, y):
return x + y
@deprecated
class SomeOldClass(object):
pass
You can give a "reason" message to help the developer to choose another function/class:
from deprecated import deprecated
@deprecated(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.
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
