On Wed, Dec 5, 2012 at 1:52 PM, Nathaniel Smith <[email protected]> wrote:
> If you're defining your own warning class, you might consider using
> FutureWarning instead of UserWarning.
>
> We had a discussion about this issue for numpy recently:
>   http://mail.scipy.org/pipermail/numpy-discussion/2012-May/062460.html
> What we eventually ended up with:
>   http://mail.scipy.org/pipermail/numpy-discussion/2012-May/062468.html

Thanks for the pointers, Nathaniel. Though I think I disagree with
continuing to use DeprecationWarnings for features that will go away
and just break code - shouldn't users be given ample opportunity of
coming changes without having to find out by having their code break
at a future release?

Robert Kern wrote:

> Using FutureWarning for deprecated functions (i.e. functions that will
> disappear in future releases) is an abuse of the semantics.
> FutureWarning is for things like the numpy.histogram() changes from a
> few years ago: changes in default arguments that will change the
> semantics of a given function call. Some of our DeprecationWarnings
> possibly should be FutureWarnings, but most shouldn't I don't think.

then Nathaniel summarized:

> If a function or similar will just disappear in a future release,
> causing obvious failures in any code that depends on it, then
> DeprecationWarning is fine. People's code will unexpectedly break from
> time to time, but in safe ways, and anyway downgrading is easy.
> - Otherwise FutureWarning is preferred

And most of our DeprecationWarnings *are* about code that will just
disappear in future releases.

--
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to