Python-Deprecated
Python @deprecated decorator to deprecate old python classes, functions or methods.
Deprecated is Easy to Use
If you need to mark a function or a method as deprecated, you can use the @deprecated decorator:
Save in a hello.py:
from deprecated import deprecated
@deprecated
def some_old_function(x, y):
return x + y
class SomeClass(object):
@deprecated
def some_old_method(self, x, y):
return x + y
some_old_function(12, 34)
obj = SomeClass()
obj.some_old_method(5, 8)
And Easy to Setup
And run it:
$ pip install Python-Deprecated
$ python hello.py
hello.py:15: DeprecationWarning: Call to deprecated function some_old_function.
some_old_function(12, 34)
hello.py:17: DeprecationWarning: Call to deprecated function some_old_method.
obj.some_old_method(5, 8)
Links
Metadata
Release files for Python-Deprecated 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Python-Deprecated-1.1.0.tar.gz | 2.9 kB | Without provenance | Details for Python-Deprecated-1.1.0.tar.gz |
Release files / Python-Deprecated-1.1.0.tar.gz
| Download URL | Python-Deprecated-1.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a242b3c1721f97912330b12cd5529abfa5b3876084a6c60a2c683a87d4b0dd6f
|
|
BLAKE2b-256 checksum How to use checksums |
c08ec5875a0cacfcd90151be65e7bf3e08686d67d390c74eb2cc2cdada4974d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Python-Deprecated 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.