Deprecated
Python @deprecated decorator to deprecate old python classes, functions or methods.
Decision gist · record as of 2026-08-14
Yes. Deprecated is stable (Production/Stable status), actively maintained, has no known vulnerabilities, and solves a common library-maintenance problem with low friction. Install it if you maintain a library or long-lived codebase and need to deprecate APIs cleanly.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel distribution.
- Active maintenance with a recent release (288 days ago) and an active repository; widely used in the top 1000 PyPI packages.
License · maintenance · safety
MIT (permissive) — MIT license permits use in any project, commercial or open-source, with minimal restrictions.
last release 2025-10-30 (288 days) · last repo commit 2026-04-22 · 333 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 189,603,486 downloads/mo, #217 on PyPI
Alternatives
Verify before relying
pip install Deprecated
from deprecated import deprecated
@deprecated(version='1.2.1', reason="Use new_function instead")
def old_function():
pass
old_function() # Emits DeprecationWarning- Whether inspect2 is a runtime dependency or an optional extra for enhanced introspection
- Whether the Sphinx integration (versionadded, versionchanged directives) requires Sphinx as a peer dependency
What it is and what it does
Deprecated is a decorator library for marking Python functions, methods, and classes as deprecated. It emits standard DeprecationWarnings when deprecated code is called, helping library maintainers signal to users that certain APIs will be removed or changed. The package wraps the target using wrapt and inspect2 to preserve function signatures and metadata while injecting the warning behavior.
Beyond runtime warnings, Deprecated integrates with Sphinx documentation generation, providing directives (deprecated, versionadded, versionchanged) that automatically render deprecation notices in generated docs. This allows you to document lifecycle changes inline with your code and have them appear in both help() output and published documentation.
Use it for
- Signal that a library function is being phased out and direct users to its replacement
- Mark legacy methods in a class as deprecated while maintaining backward compatibility during a transition period
- Generate Sphinx documentation that clearly shows which APIs are new, changed, or deprecated across versions
- Emit warnings during development and testing to catch internal uses of deprecated code before release
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Deprecated is stable (Production/Stable status), actively maintained, has no known vulnerabilities, and solves a common library-maintenance problem with low friction. Install it if you maintain a library or long-lived codebase and need to deprecate APIs cleanly.
Install
deprecated on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release (288 days ago) and an active repository; widely used in the top 1000 PyPI packages.
License in practice
MIT license permits use in any project, commercial or open-source, with minimal restrictions.
Quickstart
pip install Deprecated
from deprecated import deprecated
@deprecated(version='1.2.1', reason="Use new_function instead")
def old_function():
pass
old_function() # Emits DeprecationWarning
Verify before relying
- Whether inspect2 is a runtime dependency or an optional extra for enhanced introspection
- Whether the Sphinx integration (versionadded, versionchanged directives) requires Sphinx as a peer dependency
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 packageswraptinspect2 |
| Maintenance | Actively maintained 288 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 189,603,486 / month, #217 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | 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 |
Evidence: deprecated-1.3.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mark function deprecated”
- DeprecatedProvides a @deprecated decorator to mark functions, methods, and…
- zope.deprecationProvides a decorator and utilities to mark Python modules, classes,…
- deprecationProvides decorators to automate deprecation warnings, update…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also deprecat · pyDeprecate · legacy-api-wrap · deprecation · zope.deprecation · types-Deprecated · debtcollector · flake8-deprecated · deprecation-alias · public