Your message dated Sat, 06 Sep 2008 13:02:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#497324: fixed in lxml 2.1.1-2
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
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.diff.gz
to pool/main/l/lxml/lxml_2.1.1-2.diff.gz
lxml_2.1.1-2.dsc
to pool/main/l/lxml/lxml_2.1.1-2.dsc
python-lxml-dbg_2.1.1-2_i386.deb
to pool/main/l/lxml/python-lxml-dbg_2.1.1-2_i386.deb
python-lxml_2.1.1-2_i386.deb
to pool/main/l/lxml/python-lxml_2.1.1-2_i386.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.
Matthias Klose <[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: Sat, 06 Sep 2008 12:34:24 +0000
Source: lxml
Binary: python-lxml python-lxml-dbg
Architecture: source i386
Version: 2.1.1-2
Distribution: unstable
Urgency: low
Maintainer: Matthias Klose <[EMAIL PROTECTED]>
Changed-By: Matthias Klose <[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) unstable; urgency=low
.
* Fix import, when python-stats is installed (Andrew Deason).
Closes: #497324.
Checksums-Sha1:
430a5f75d4bfe7bf47af2f53f318fb3f051c05a9 1140 lxml_2.1.1-2.dsc
11b0ab954ee525663fd6e2e6db8d3c818c5462cc 4230 lxml_2.1.1-2.diff.gz
9ed679d722f54a56696ecf5daa563a2bbcc3a2a3 950294 python-lxml_2.1.1-2_i386.deb
edcacfe2478185e5f843ffc8fc09f4b92537f469 3627106
python-lxml-dbg_2.1.1-2_i386.deb
Checksums-Sha256:
48399392bac639eabc542ea798d2d7ec059077927468cae9f27404bb6158e34e 1140
lxml_2.1.1-2.dsc
c123e1be38fcd17b2da503fdc4f08b5c8697cf408e9484550562ed2269f9b4fb 4230
lxml_2.1.1-2.diff.gz
51201d56c6cfe5eb266a3e3e708322884f809d7ec7ff7ea5ff69573ebea8492b 950294
python-lxml_2.1.1-2_i386.deb
fb6cea27f0bb99fdfc580b79898a9041aaf8f39da4dd667ab51b45d2eea6009b 3627106
python-lxml-dbg_2.1.1-2_i386.deb
Files:
06d8c8a78f6861a1dcdbfbc5da83d914 1140 python optional lxml_2.1.1-2.dsc
3a1ebb333cecdc8515460b1113494ff8 4230 python optional lxml_2.1.1-2.diff.gz
7d512b0b29af3e22efc089890c298d6a 950294 python optional
python-lxml_2.1.1-2_i386.deb
067007fbca9e6f6356a3fe31d74b04a9 3627106 python extra
python-lxml-dbg_2.1.1-2_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIwnuoStlRaw+TLJwRAmmSAJ9Rtb0cSf6kj9fOgx68O9VP5kUFXQCffavj
6jynHZ7tI5F2NhjHXRMEpt4=
=vJhj
-----END PGP SIGNATURE-----
--- End Message ---