[Numpy-discussion] Adding a version system to the deprecation functions in numpy/lib/utils ?

David Cournapeau david@ar.media.kyoto-u.ac...
Fri Jun 20 01:54:07 CDT 2008

Robert Kern wrote:
> As long as we keep the policy that DeprecationWarnings last precisely
> one minor version, I don't think it really adds any information.

I was not aware of this policy. Obviously, it has no use in that case.

> 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.

If we change default values of some functions, you don't think it would 
be useful to raise a warning if people do not use the argument (that is 
use the default value) ? I remember a long time ago, when some functions 
got their axis argument changed (pre 1.0 numpy), it took me a long time 
to realize why my code broke.

By saying the function has to handle the old argument, you are implying 
that we don't allow API changes, right ? If we enforce this, again, 
deprecating argument/default value has no value at all. But up to now, 
it has happened fairly regularly.



More information about the Numpy-discussion mailing list