[Python-modules-team] Bug#519580: python-numpy: broken 'deprecated' function whenever warnings filterings is on -- tiny misprint in utils.py, remove ", "
Yaroslav Halchenko
debian at onerussian.com
Fri Mar 13 16:21:25 UTC 2009
Package: python-numpy
Version: 1:1.2.1-1
Severity: normal
Tags: patch
how to reproduce -- enable filtering of warnings, and use deprecated
function
>>> import warnings
>>> warnings.filterwarnings('ignore', 'buga duga', Warning)
>>> import scipy
>>> import scipy.stats
>>> scipy.sparse.speye(1,1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/numpy/lib/utils.py", line 110, in newfunc
warnings.warn(str1, DeprecationWarning)
File "/usr/lib/python2.5/warnings.py", line 62, in warn
globals)
File "/usr/lib/python2.5/warnings.py", line 85, in warn_explicit
if ((msg is None or msg.match(text)) and
TypeError: expected string or buffer
Fix should be banal:
in numpy/lib/utils.py:105 replace
str1 = "%s is deprecated, use %s" % (oldname, newname),
with
str1 = "%s is deprecated, use %s" % (oldname, newname)
;-)
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'stable'), (300, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-numpy depends on:
ii libatlas3gf-base [libla 3.6.0-22.1~debug Automatically Tuned Linear Algebra
ii libatlas3gf-sse [liblap 3.6.0-22.1~debug Automatically Tuned Linear Algebra
ii libatlas3gf-sse2 [libla 3.6.0-22.1~debug Automatically Tuned Linear Algebra
ii libblas3gf [libblas.so. 1.2-2 Basic Linear Algebra Subroutines 3
ii libc6 2.9-4 GNU C Library: Shared libraries
ii libgcc1 1:4.3.1-9 GCC support library
ii libgfortran3 4.3.1-9 Runtime library for GNU Fortran ap
ii liblapack3gf [liblapack 3.1.1-1 library of linear algebra routines
ii python 2.5.2-2 An interactive high-level object-o
ii python-central 0.6.11 register and build utility for Pyt
python-numpy recommends no packages.
Versions of packages python-numpy suggests:
ii python-nose 0.10.4-2 test discovery and running for Pyt
pn python-numpy-dbg <none> (no description available)
ii python-numpy-doc 1:1.2.1-1 NumPy documentation
-- no debconf information
More information about the Python-modules-team
mailing list