[Python-ideas] A library for the deprecation of a function/class
Ethan Furman
ethan at stoneleaf.us
Tue May 6 01:57:38 CEST 2014
On 04/17/2014 12:28 PM, Stéphane Wirtel wrote:
>
> With the CPython sprint, I was thinking about a lib to mark a function/class as deprecated.
[...]
> The deprecated decorator should check the version of the software and the version of Python if asked with the arguments.
> it will raise warnings.warn with PendingDeprecationWarning or DeprecationWarning. Can be used in the documentation, via
> introspection.
Seems like a useful idea. Others have also thought so and there are some code snippets at
https://wiki.python.org/moin/PythonDecoratorLibrary#Generating_Deprecation_Warnings
--
~Ethan~
More information about the Python-ideas
mailing list