[Numpy-discussion] Silent DeprecationWarnings under Python 2.7 onwards

Ralf Gommers ralf.gommers@googlemail....
Wed Sep 15 08:28:37 CDT 2010


On Fri, Sep 10, 2010 at 12:05 AM, Peter <
numpy-discussion@maubp.freeserve.co.uk> wrote:

> Hi all,
>
> NumPy currently makes extensive use of the DeprecationWarning
> class to alert users when some feature is going to be withdrawn.
> However, as of Python 2.7, the DeprecationWarning is silent by
> default, see:
>
>
> http://docs.python.org/library/warnings.html#updating-code-for-new-versions-of-python
>
> This makes sense to me for deprecation warnings from Python
> itself or the standard library - after all, Python 2.7 is the last of the
> Python 2.x series.
>

The reason for the change is explained in the paragraph you link to, 2.7
being the final minor release in the 2.x series isn't it.

There are many other packages/programs built on numpy, the user/developer
distinction can be made in the same way as for Python itself. I fail to see
a reason not to follow the lead of the Python core developers here.

Cheers,
Ralf



> However, I believe that a silent DeprecationWarning is bad news
> for third party libraries like NumPy where many end users are
> coders and we want them to see these warnings by default.
> Is anyone else concerned about this? A typical NumPy user
> (on Python 2.7+ or Python 3.2+) may never see the warnings
> (because they have to deliberately turn them on), the first they'll
>  know about it is when they upgrade to a new release and their
> code suddenly stops working.
>
> Potentially NumPy would have to introduce its own NumPy
> specific DeprecationWarning warning class, and use that.
>
> Peter
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100915/9da64ca0/attachment.html 


More information about the NumPy-Discussion mailing list