--- id: zope-deprecation version: "6.0" license: ZPL-2.1 license_treatment: unclear maintenance: aging --- # zope.deprecation — Zope Deprecation Infrastructure License: unclear · Maintenance: aging · Downloads: 2.9M/mo ## 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 above — 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 pip install zope-deprecation uv add zope-deprecation 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_current - Install friction: low - Maintenance: aging - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags deprecation decorator, mark deprecated code, deprecation warnings, python deprecation utility, deprecated function marker, zope deprecation, warn on deprecated usage, deprecation-management, api-lifecycle [View on SkillFed](https://skillfed.io/packages/zope-deprecation) · [View on PyPI](https://pypi.org/project/zope-deprecation/)