skillfed

Deprecated

Python @deprecated decorator to deprecate old python classes, functions or methods.

deprecated Permissive license MIT Active 333 v1.3.1 released

Install

deprecated on PyPI

pip

pip install deprecated

uv

uv add deprecated

poetry

poetry add deprecated

Package 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

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
deprecation decorator pythonmark function deprecateddeprecation warningsphinx deprecation directivepython deprecate methodversion deprecation trackingdeprecated class decorator

Similar packages