deprecation
A library to handle automated deprecations
Decision gist · record as of 2026-08-14
Yes, if you maintain a library and need to manage deprecation systematically. The package is stable and production-ready, but abandoned—no updates since 2020. It works well for its narrow purpose and has minimal dependencies. Install it only if you're comfortable maintaining compatibility yourself or if your project targets Python versions the package explicitly supports (2.7, 3.5–3.7).AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single lightweight dependency (packaging).
- Maintenance status is abandoned—last release was 2020-04-20 and no commits since 2023-04-11—so expect no bug fixes or updates for new Python versions.
License · maintenance · safety
Apache 2 (permissive) — Licensed under Apache 2 (permissive), so you can use, modify, and distribute freely in commercial and open-source projects without significant restrictions.
last release 2020-04-20 (2307 days) · last repo commit 2023-04-11 · 95 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 99,399,347 downloads/mo, #347 on PyPI
Alternatives
Verify before relying
pip install deprecation
import deprecation
@deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
current_version="1.5",
details="Use the bar function instead")
def foo():
"""Do some stuff"""
return 1- Whether the package works reliably with Python versions released after 2020 (e.g., 3.9+)
- Whether the packaging dependency has any known incompatibilities or security issues
What it is and what it does
The deprecation library automates the lifecycle of deprecated code by providing two main decorators: @deprecated marks functions or methods as deprecated and automatically appends deprecation details to their docstrings, while @fail_if_not_removed enforces removal deadlines by raising AssertionError in tests when code should have been deleted. This eliminates manual docstring updates and prevents deprecated code from lingering indefinitely—you specify when code was deprecated and when it should be removed, and the library handles the rest.
The package works by raising DeprecationWarning subclasses, which Python ignores by default in production but can be caught during development using Python's -W flag or PYTHONWARNINGS environment variable. Even without enabling warnings, the docstring updates and test failures still occur, so you get the benefits of automated deprecation tracking regardless of warning configuration.
Use it for
- Mark a library function as deprecated and automatically add removal deadline to its docstring for API documentation
- Enforce that deprecated code is actually removed by a target version using @fail_if_not_removed in your test suite
- Track deprecation across multiple versions of a package without manually editing docstrings each time
- Catch deprecated function calls during development by running tests with PYTHONWARNINGS enabled
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain a library and need to manage deprecation systematically.
The package is stable and production-ready, but abandoned—no updates since 2020. It works well for its narrow purpose and has minimal dependencies. Install it only if you're comfortable maintaining compatibility yourself or if your project targets Python versions the package explicitly supports (2.7, 3.5–3.7).
Install
deprecation on PyPI
Before you install
Low install friction with a single lightweight dependency (packaging). Maintenance status is abandoned—last release was 2020-04-20 and no commits since 2023-04-11—so expect no bug fixes or updates for new Python versions.
License in practice
Licensed under Apache 2 (permissive), so you can use, modify, and distribute freely in commercial and open-source projects without significant restrictions.
Quickstart
pip install deprecation
import deprecation
@deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
current_version="1.5",
details="Use the bar function instead")
def foo():
"""Do some stuff"""
return 1
Verify before relying
- Whether the package works reliably with Python versions released after 2020 (e.g., 3.9+)
- Whether the packaging dependency has any known incompatibilities or security issues
Package facts
| License | Apache 2 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepackaging |
| Maintenance | Abandoned 2,307 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 99,399,347 / month, #347 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/StableLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: deprecation-2.1.0-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 › “automated deprecation warnings”
- deprecationProvides decorators to automate deprecation warnings, update…
- debtcollectorDebtcollector provides Python deprecation patterns and strategies…
- deprecation-aliasProvides a wrapper around the deprecation library to mark and manage…
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 · Deprecated · pyDeprecate · debtcollector · zope.deprecation · deprecation-alias · legacy-api-wrap · django-deprecate-fields · flake8-deprecated · venusian