Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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

from deprecated import deprecated

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

class SomeClass(object):
    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 DeprecationWarning: Call to deprecated function some_old_function.
  some_old_function(12, 34) DeprecationWarning: Call to deprecated function some_old_method.
  obj.some_old_method(5, 8)

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.7 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Nov 20, 2017
(3.6 kB) Copy SHA256 Hash SHA256
Source None Nov 20, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate