From: Nathaniel S. <nj...@po...> - 2012-12-05 21:52:51
|
On Wed, Dec 5, 2012 at 9:45 PM, Paul Ivanov <piv...@gm...> wrote: > Hey everyone, > > In adding a deprecation warning in this pull request [1], Damon and I > learned that DeprecationWarnings are ignored by default in Python 2.7 > > This is rather unfortunate, and I outlined possible workarounds that I > see in a commend on that PR [2]. > > In trying to rectify this situation, I have created a > MatplotlibDeperecationWarning class that inherits from UserWarning, > which is *not* ignored by default. [3] > > 1. https://github.com/matplotlib/matplotlib/pull/1535 > 2. https://github.com/matplotlib/matplotlib/pull/1535#issuecomment-11061572 > 3. https://github.com/matplotlib/matplotlib/pull/1565 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 -n |