Skip to main content

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 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)

Metadata

Release files for Deprecated 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Deprecated 1.1.1
File Size Uploaded Provenance Actions
Deprecated-1.1.1.tar.gz 3.7 kB Without provenance Details for Deprecated-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Deprecated 1.1.1
File Interpreter ABI Platform Actions
Deprecated-1.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for Deprecated-1.1.1-py2.py3-none-any.whl

Total release size: 8.4 kB

Release files / Deprecated-1.1.1.tar.gz

Download URL Deprecated-1.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
86f79eebfa3f56636dfaff8b35c9cce7508355c7dea96b9d4e9b95efc3657668
BLAKE2b-256 checksum
How to use checksums
4c1fffae419a0f9de81084faaf83690e1dc42b6329745fbe7ccff4a41105d9bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Deprecated-1.1.1-py2.py3-none-any.whl

Download URL Deprecated-1.1.1-py2.py3-none-any.whl
Size 4.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0098d3312a28465be521b9a40626ef7ddb489a880bc61789ec23e88569b41f74
BLAKE2b-256 checksum
How to use checksums
cc3bb8539e01e7d8318430e48dc426749a942efbf8bc04d6cbbd670c56b1888c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Deprecated 1.1.1

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.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page