A Python library providing a `@deprecated` decorator to mark functions, classes, or methods as deprecated, encouraging developers to transition to newer APIs. Current version: 1.3.1. Release cadence: Regular updates with new features and fixes.
pip install deprecatedVerified import paths — ran on the pinned version, not inferred.
Example of using the `@deprecated` decorator to mark a function as deprecated.
Upgrade to wrapt 2.x or adjust your code to maintain compatibility.
Upgrade to Python 3.7 or later.
Always specify the version when marking a function as deprecated.
Use `@deprecated.deprecated` when marking a function as deprecated, optionally passing arguments like version: `@deprecated.deprecated(version='1.0')`.
Run `pip install deprecated` in your terminal to install the library.
Upgrade the related conflicting packages to their latest compatible versions, often starting with `pip install --upgrade pip setuptools` and then `pip install --upgrade pyopenssl` or other libraries mentioned in the traceback.
To make `DeprecationWarning` messages visible, run your Python script with `PYTHONWARNINGS='default'` or add `import warnings; warnings.simplefilter('default', DeprecationWarning)` at the beginning of your script.