[Numpy-discussion] test errors on deprecation/runtime warnings

Ralf Gommers ralf.gommers at googlemail.com
Thu Feb 16 14:05:06 EST 2012


Hi,

Last week we merged https://github.com/numpy/numpy/pull/201, which causes
DeprecationWarning's and RuntimeWarning's to be converted to errors if they
occur when running the test suite. The purpose of that is to make sure that
code that still uses other deprecated code (or code that for some reason
generates warnings) to be cleaned up. In principle this is a good idea
IMHO, but after merging we quickly found some problems with failing tests
in scipy.

Because this potentially affects any other projects or users that use the
numpy NoseTester test runner, here's a proposal to deal with this issue:
- make this behavior configurable by a keyword in `NoseTester.__init__()`
- default to raising an error in numpy master
- when making a branch for release, immediately set the default to not
raise. Do this not only for the 1.7 release, but for any future release (at
least until the oldest numpy version still in use has the keyword). The
reason for this is that otherwise a new numpy release will trigger test
failures in older releases of scipy or other packages.

The pros:
- We find issues that otherwise get ignored (see the issues Christoph just
found when compiling with MSVC).
- We're forced to clean up code when submitting PRs, instead of letting the
warnings accumulate and having to deal with them just before release time.

The con:
- You may see test errors if you run a released version of scipy with a
development version of numpy.

Opinions? Concerns?

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120216/3fdca130/attachment.html>


More information about the NumPy-Discussion mailing list