Skip to main content

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

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Deprecated-1.1.4.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Deprecated-1.1.4-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Deprecated-1.1.4.tar.gz.

File metadata

  • Download URL: Deprecated-1.1.4.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.1

File hashes

Hashes for Deprecated-1.1.4.tar.gz
Algorithm Hash digest
SHA256 5a7dd008d527b5d91004f441fdc001390a54f3991863b43da0066c8f66f56407
MD5 3a12b7a8c899ebae103dc464131aa110
BLAKE2b-256 52efc845f7f9e4dc88976f4560ccff0b426645f3595e1064af9159668fb92cb9

See more details on using hashes here.

File details

Details for the file Deprecated-1.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: Deprecated-1.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.1

File hashes

Hashes for Deprecated-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 83ce85f2c3c314bd8aeae8302eec91fa8e389fb4e141a8de9f5068623094dd69
MD5 26b83233cb3e74e8561fd29c0611c7b5
BLAKE2b-256 90a2cf0ed2e70c48f6bdc09b46ad4c978409be83297ec6160c796aaa06379134

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page