Deprecated
Python @deprecated decorator to deprecate old python classes, functions or methods.
Install
deprecated on PyPI
pip
pip install deprecateduv
uv add deprecatedpoetry
poetry add deprecatedPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — wrapt, inspect2 |
| Maintenance | actively maintained — 287 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: deprecated-1.3.1-py2.py3-none-any.whl
Keywords: deprecate, deprecated, deprecation, warning, warn, decorator
About Deprecated
from the package's own PyPI description — quoted content, verbatim
Deprecated Library
Deprecated is Easy to Use `````````````````````````
If you need to mark a function or a method as deprecated,
you can use the @deprecated decorator:
Save in a hello.py:
.. code:: python
from deprecated import deprecated
@deprecated(version='1.2.1', reason="You should use another function")
def some_old_function(x, y):
return x + y
class SomeClass(object):
@deprecated(version='1.3.0', reason="This method is deprecated")
def some_old_method(self, x, y):
return x + y
some_old_function(12, 34)
obj = SomeClass()
obj.some_old_method(5, 8)
And Easy to Setup `````````````````
And run it:
.. code:: bash
$ pip install Deprecated
$ python hello.py
hello.py:15: DeprecationWarning: Call to deprecated function (or staticmethod) some_old_function.
(You should use another function) -- Deprecated since version 1.2.0.
some_old_function(12, 34)
hello.py:17: DeprecationWarning: Call to deprecated method some_old_method.
(This method is deprecated) -- Deprecated since version 1.3.0.
obj.some_old_method(5, 8)
You can document your...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Provides a @deprecated decorator to mark functions, methods, and classes as deprecated, emitting DeprecationWarning when called and optionally generating Sphinx documentation directives.
Low friction: pure-Python wheel with only two runtime dependencies (wrapt and inspect2). Active maintenance with recent release (287 days ago) and ongoing repository activity.
MIT license permits commercial and private use with minimal restrictions; you must include the license text in distributions but face no copyleft obligations.
Usage
pip install Deprecated
from deprecated import deprecated
@deprecated(version='1.2.1', reason="Use new_function instead")
def old_function(x, y):
return x + y
old_function(1, 2) # emits DeprecationWarning
Verdict: Stable, well-maintained library with no known vulnerabilities and permissive MIT licensing. Minimal dependencies and broad Python version support (2.7 through 3.14) make it a low-risk choice for adding deprecation markers to existing codebases.
Needs verification
- Whether wrapt and inspect2 themselves have known vulnerabilities or maintenance issues
- Performance impact of the decorator on frequently-called deprecated functions
Similar packages
permissive · top 1,000 on PyPI
overridespermissive · top 1,000 on PyPI
azure-commonpermissive · top 1,000 on PyPI
attrspermissive · top 100 on PyPI
msrestpermissive · top 1,000 on PyPI
responsespermissive · top 1,000 on PyPI
oauth2clientpermissive · top 1,000 on PyPI
decoratorpermissive · top 1,000 on PyPI
html5libpermissive · top 1,000 on PyPI
tifffilepermissive · top 1,000 on PyPI