[Numpy-discussion] Adding a version system to the deprecation functions in numpy/lib/utils ?
Fri Jun 20 01:53:40 CDT 2008
On Fri, Jun 20, 2008 at 01:29, David Cournapeau
> I was thinking about adding a versioning into the deprecation
> related functions. E.g., you could say that one function is deprecated
> in version 1.2, but adding a in_version in deprecate. Does anyone have
> strong feeling against it ?
As long as we keep the policy that DeprecationWarnings last precisely
one minor version, I don't think it really adds any information.
> It should be a transparant change. I would
> also like to add a deprecation function to handle arguments and default
> values, but this will be more work, obviously.
It will be hard to write something generic. The individual functions
will still have to write code that handles the old arguments anyways,
so all it would do is move the warning message from a warnings.warn()
into the decorator. It's not worth it.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion