Your message dated Wed, 10 Sep 2008 19:32:09 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#497324: fixed in lxml 2.1.1-2.1
has caused the Debian Bug report #497324,
regarding python-lxml: lxml.etree unusable when python-stats is installed
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
497324: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497324
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: python-lxml
Severity: serious
Version: 2.1.1-1
When the python-stats package is installed, attempting to use
lxml.etree results in an AttributeError being thrown:
ng:~# python -c 'import lxml.etree'
ng:~# apt-get install -qq python-stats
Selecting previously deselected package python-stats.
(Reading database ... 341464 files and directories currently installed.)
Unpacking python-stats (from .../python-stats_0.6-7_all.deb) ...
Setting up python-stats (0.6-7) ...
ng:~# python -c 'import lxml.etree'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "lxml.etree.pyx", line 40, in lxml.etree (src/lxml/lxml.etree.c:119415)
AttributeError: 'module' object has no attribute 'BytesIO'
ng:~# apt-get remove -qq python-stats
(Reading database ... 341473 files and directories currently installed.)
Removing python-stats ...
ng:~# python -c 'import lxml.etree'
ng:~#
Lines 39-42 in lxml.etree.pyx look like this:
try:
from io import BytesIO, StringIO
except ImportError:
from StringIO import StringIO, StringIO as BytesIO
When python-stats is not installed, the 'io' module does not exist, so
line 40 throws an ImportError which is caught, and all is good. When
python-stats is installed, it installs `io.py', which seems unrelated to
this, and doesn't define BytesIO. Normally this would generate an
ImportError as well, but the C code generated from the .pyx tries to get
BytesIO as an attribute of io, which throws an AttributeError, which
goes uncaught and propagates up to the caller.
I'm not sure if this is a bug in python-lxml, python-stats, or whatever
generates the C from the pyx, but I'm filing this for python-lxml since
I know how to fix it there. Attached is a patch to the pyx which would
fix this issue when the C code is regenerated. I don't know how to
regenerate it (pyrex doesn't seem to like the pyx files, and I don't
know what else to try...), so the C is unpatched. Not sure if this is
the "correct" way to fix it, but it should work when the C is
regenerated.
Wasn't sure of the severity on this... an unrelated package installed
causes a rather large portion of this package to be unusable, and
anything that depends on it is thus unusable (I discovered this because
bcfg2 stopped working). Seems like it might be RC, though I'm unsure (it
seems like not Conflict'ing with python-stats could be a policy
violation when the package largely doesn't work when python-stats is
installed), but marking as serious just in case.
--
Andrew Deason
[EMAIL PROTECTED]
--- lxml-2.1.1/src/lxml/lxml.etree.pyx 2008-08-31 16:15:03.000000000 -0500
+++ lxml-2.1.1/src/lxml/lxml.etree.pyx 2008-08-31 16:16:30.000000000 -0500
@@ -38,7 +38,7 @@
cdef object BytesIO, StringIO
try:
from io import BytesIO, StringIO
-except ImportError:
+except (ImportError, AttributeError):
from StringIO import StringIO, StringIO as BytesIO
cdef object _elementpath
--- End Message ---
--- Begin Message ---
Source: lxml
Source-Version: 2.1.1-2.1
We believe that the bug you reported is fixed in the latest version of
lxml, which is due to be installed in the Debian FTP archive:
lxml_2.1.1-2.1.diff.gz
to pool/main/l/lxml/lxml_2.1.1-2.1.diff.gz
lxml_2.1.1-2.1.dsc
to pool/main/l/lxml/lxml_2.1.1-2.1.dsc
python-lxml-dbg_2.1.1-2.1_amd64.deb
to pool/main/l/lxml/python-lxml-dbg_2.1.1-2.1_amd64.deb
python-lxml_2.1.1-2.1_amd64.deb
to pool/main/l/lxml/python-lxml_2.1.1-2.1_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Thomas Viehmann <[EMAIL PROTECTED]> (supplier of updated lxml package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Wed, 10 Sep 2008 20:55:19 +0200
Source: lxml
Binary: python-lxml python-lxml-dbg
Architecture: source amd64
Version: 2.1.1-2.1
Distribution: unstable
Urgency: low
Maintainer: Matthias Klose <[EMAIL PROTECTED]>
Changed-By: Thomas Viehmann <[EMAIL PROTECTED]>
Description:
python-lxml - pythonic binding for the libxml2 and libxslt libraries
python-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries
(debug ext
Closes: 497324
Changes:
lxml (2.1.1-2.1) unstable; urgency=low
.
* Non-maintainer upload.
* Generate src/lxml/lxml.*.[ch] from the .pyx files.
Closes: #497324.
Checksums-Sha1:
06b68e243005f80907e797acabeaff0444a92c4b 1164 lxml_2.1.1-2.1.dsc
1eab82e84ed8e195b51b6780aa58c5a4a3a9dfe9 4376 lxml_2.1.1-2.1.diff.gz
8da7676741eee645a0179606f0daf93628d88fe3 1187994
python-lxml_2.1.1-2.1_amd64.deb
485ff37a234c3f2648143131723f06f1bd181e8e 4249482
python-lxml-dbg_2.1.1-2.1_amd64.deb
Checksums-Sha256:
afc23bf34078e597cdaf2c26f708378217ca8132503521f84ee6e5d796d4fcd0 1164
lxml_2.1.1-2.1.dsc
327ce7b850b6d7b1d2d5f58f0c3b7ee97b0ffe1cdbc6bd412ef04ef8fd9d2b59 4376
lxml_2.1.1-2.1.diff.gz
981f5bfb45cb8ac593a3361b5dab5218d39475a60e1548cbd43980451533e6be 1187994
python-lxml_2.1.1-2.1_amd64.deb
7990d487be687fdb6cc227c133256229b113efa7e878fb3698b5882db93e2c81 4249482
python-lxml-dbg_2.1.1-2.1_amd64.deb
Files:
dbd4ec587338691d6a5897b1f9213a5f 1164 python optional lxml_2.1.1-2.1.dsc
ee5ae0cd12e66724ac209b364f12fe28 4376 python optional lxml_2.1.1-2.1.diff.gz
8199ef4fa31c35a2368743182fd46894 1187994 python optional
python-lxml_2.1.1-2.1_amd64.deb
f02f846df8f69775ab9a5bde40b732d7 4249482 python extra
python-lxml-dbg_2.1.1-2.1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkjIHWUACgkQriZpaaIa1PnQNQCfb2ByZ0x4Dk42mUyzFZbbeNCE
a4YAnjKyuHMfL8pMpK4JqxZtfrQu5mUq
=Ud0Z
-----END PGP SIGNATURE-----
--- End Message ---