Versions

Description

Python @deprecated decorator to deprecate old python classes, functions or methods. <h2>Installation</h2> <pre>pip install Deprecated</pre> <h2>Usage</h2> To use this, decorate your deprecated function with @deprecated decorator: <pre>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 </pre> You can give a "reason" message to help the developer to choose another function/class: <pre>from deprecated import deprecated @deprecated(reason="use another function") def some_old_function(x, y): return x + y </pre> <h2>Authors</h2> 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.

Repository

https://github.com/tantale/deprecated

Project Slug

deprecated

Last Built

11 months, 1 week ago passed

Maintainers

Home Page

https://github.com/tantale/deprecated

Badge

Tags

python, decorator, deprecated, warning

Short URLs

deprecated.readthedocs.io
deprecated.rtfd.io

Default Version

latest

'latest' Version

master