Deprecated

Python @deprecated decorator to deprecate old python classes, functions or methods.

Latest version: 1.3.1 registry icon
Maintenance score
45
Safety score
100
Popularity score
20
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
1.3.1 0 0 0 0 0
1.3.0 0 0 0 0 0
1.2.18 0 0 0 0 0
1.2.17 0 0 0 0 0
1.2.16 0 0 0 0 0
1.2.15 0 0 0 0 0
1.2.14 0 0 0 0 0
1.2.13 0 0 0 0 0
1.2.12 0 0 0 0 0
1.2.11 0 0 0 0 0
1.2.10 0 0 0 0 0
1.2.9 0 0 0 0 0
1.2.8 0 0 0 0 0
1.2.7 0 0 0 0 0
1.2.6 0 0 0 0 0
1.2.5 0 0 0 0 0
1.2.4 0 0 0 0 0
1.2.3 0 0 0 0 0
1.2.2 0 0 0 0 0
1.2.1 0 0 0 0 0
1.2.0 0 0 0 0 0
1.1.5 0 0 0 0 0
1.1.4 0 0 0 0 0
1.1.3 0 0 0 0 0
1.1.2 0 0 0 0 0
1.1.1 0 0 0 0 0
1.1.0 0 0 0 0 0

Stability
Latest release:

1.3.1 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



Deprecated Decorator

Python @deprecated decorator to deprecate old python classes, functions or methods.

license GitHub release PyPI GitHub Workflow Status Coveralls branch Read the Docs (version)

Installation

pip install Deprecated

Usage

To use this, decorate your deprecated function with @deprecated decorator:

from deprecated import deprecated


@deprecated
def some_old_function(x, y):
    return x + y

You can also decorate a class or a method:

from deprecated import deprecated


class SomeClass(object):
    @deprecated
    def some_old_method(self, x, y):
        return x + y


@deprecated
class SomeOldClass(object):
    pass

You can give a "reason" message to help the developer to choose another function/class:

from deprecated import deprecated


@deprecated(reason="use another function")
def some_old_function(x, y):
    return x + y

Authors

The authors of this library are: Marcos CARDOSO, and Laurent LAPORTE.

The original code was made in this StackOverflow post by Leandro REGUEIRO, Patrizio BERTONI, and Eric WIESER.