[Pkg-scicomp-devel] Bug#585192: cpushare: Python string exceptions no more allowed in Python 2.6
Jakub Wilk
jwilk at debian.org
Wed Aug 25 21:00:48 UTC 2010
* Sandro Tosi <morph at ravel.debian.org>, 2010-06-09, 22:19:
>One of the changes brought by Python 2.6 is the removal of string
>exceptions, so they won't work in Python 2.6 (just a side note: they
>were also buggy before, since they were not guaranteed to work
>reliable even in <2.6); as an example:
>
>$ python2.5 -c "raise 'eggs'"
>-c:1: DeprecationWarning: raising a string exception is deprecated
>Traceback (most recent call last):
> File "<string>", line 1, in <module>
>eggs
>
>$ python2.6 -c "raise 'eggs'"
>Traceback (most recent call last):
> File "<string>", line 1, in <module>
>TypeError: exceptions must be old-style classes or derived from BaseException, not str
>
>Since 2.6 is the planned default version for the upcoming new Debian
>stable release, there are chances your package may be affected by this
>change.
>
[...]
>
>Jakub Wilk made the discovery of the problem and kindly prepared a
>list [1] of all identified packages (downloaded on 2010-06-09) along
>with files & lines that triggered the pattern search.
>
>[1] http://people.debian.org/~morph/strexp/string-exceptions.lintian
Besides the stuff listed here, i.e. cpushare/cpushare/seccomp.py:104,
there are several less obvious (and thus not automatically detected)
instances like:
raise ERROR, <something>
raise CHECKERROR, <something>
--
Jakub Wilk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-scicomp-devel/attachments/20100825/e2a84020/attachment.pgp>
More information about the Pkg-scicomp-devel
mailing list