5 May
2014
5 May
'14
11:57 p.m.
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_W... -- ~Ethan~