skillfed

zope.deprecation

Zope Deprecation Infrastructure

zope-deprecation v6.0 2.9M downloads/30d#2,849 on PyPI4
License unclear ZPL-2.1 AGING released

What it is and what it does

zope.deprecation is a small utility library for marking deprecated code paths in Python. It exports a `deprecated()` function that you apply as a decorator or call directly to flag modules, classes, functions, methods, and properties as no longer recommended. When deprecated code is accessed, the library emits a standard Python DeprecationWarning (or a custom warning class if you specify one), alerting users that they should migrate to a replacement.

The package is part of the Zope ecosystem and has been maintained since 2007. It supports modern Python versions (3.9–3.13) and runs on both CPython and PyPy. Installation is straightforward with only setuptools as a runtime dependency. The library is useful in any codebase where you need to signal API changes or removals over a deprecation period.

Use it for:

  • Mark old API functions as deprecated to warn users before removing them in a major version.
  • Signal that a module or class is being replaced, guiding users to the new implementation.
  • Suppress deprecation warnings in specific code blocks using the Suppressor context manager.
  • Customize warning classes to integrate deprecation signals with your project's warning infrastructure.
  • Document API transitions in libraries that maintain backward compatibility across releases.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a decorator and utilities to mark Python modules, classes, functions, methods, and properties as deprecated, emitting warnings when they are used.

Yes, if you maintain a library or large codebase and need a standard way to deprecate APIs. The package is lightweight, has no security vulnerabilities, and supports current Python versions. The aging maintenance status (336 days since release) is not a blocker for a stable utility like this, but verify that ZPL-2.1 licensing fits your project before adding it.

Install

zope-deprecation on PyPI

pip

pip install zope-deprecation

uv

uv add zope-deprecation

poetry

poetry add zope-deprecation

Installing zope.deprecation

Before you install

Low friction install with a single runtime dependency (setuptools). Maintenance status is aging—last release was 336 days ago—but the repository remains active with recent commits and no archived status.

License in practice

Licensed under ZPL-2.1 (Zope Public License), classified as OSI-approved. License treatment is marked unclear in the fact sheet, so review the actual license terms before use in proprietary or restricted-license projects.

Quickstart

pip install zope.deprecation

from zope.deprecation import deprecated

@deprecated('old_function', 'Use new_function instead')
def old_function():
    pass

Requires Python 3.9 or later; does not support Python 3.8 or earlier.

Verify before relying

  • Whether the ZPL-2.1 license is compatible with your project's licensing requirements.
  • Whether the aging maintenance status (336 days since last release) is acceptable for your use case.

Package facts

License ZPL-2.1 (unclear)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — setuptools
Maintenance aging — 336 days since the last release
Last repo commit
First released
Downloads 2,872,565/month — #2,849 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: zope_deprecation-6.0-py3-none-any.whl

Keywords: deprecation, deprecated, warning

Framework :: Zope :: 3Intended Audience :: DevelopersLicense :: OSI Approved :: Zope Public LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

deprecation decoratormark deprecated codedeprecation warningspython deprecation utilitydeprecated function markerzope deprecationwarn on deprecated usage
deprecation-managementapi-lifecycle

More Software Development packages