classification
Title: test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205
Type: Stage:
Components: Versions:
process
Status: open Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: doko, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2017-12-06 16:37 by doko, last changed 2017-12-07 12:44 by doko.

Messages (4)
msg307749 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2017-12-06 16:37
Seen with recent Debian and Ubuntu builds, 

builds configured with --with-system-expat, expat version 2.2.3.

======================================================================
ERROR: test_expat224_utf8_bug (test.test_xml_etree.BugsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/test/test_xml_etree.py", line 1513, in test_expat224_utf8_bug
    self.check_expat224_utf8_bug(text)
  File "/usr/lib/python2.7/test/test_xml_etree.py", line 1500, in check_expat224_utf8_bug
    root = ET.XML(xml)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1311, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1657, in feed
    self._parser.Parse(data, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 2047: unexpected end of data

======================================================================
ERROR: test_expat224_utf8_bug_file (test.test_xml_etree.BugsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/test/test_xml_etree.py", line 1518, in test_expat224_utf8_bug_file
    root = ET.fromstring(raw)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1311, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1657, in feed
    self._parser.Parse(data, 0)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1020-1021: unexpected end of data
msg307754 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-12-06 16:52
This means that you need to update the expat library. Expat version 2.2.3 contains a bug, it affects not only Python, but all depending applications.
msg307755 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-12-06 16:56
See bpo-31170 for expat 2.2.3 bug (and maybe also bpo-30947).
msg307800 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2017-12-07 12:44
ok, I can confirm that the failures go away with an updated version.  Then trying to find documentation about required external dependencies...  None.  While we have pointers to optimize the build, we don't have anything about requirements in the toplevel README.md.
History
Date User Action Args
2017-12-07 12:44:28dokosettitle: [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205 -> test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205
2017-12-07 12:44:13dokosetmessages: + msg307800
2017-12-06 16:56:13vstinnersetnosy: + vstinner
messages: + msg307755
2017-12-06 16:52:26serhiy.storchakasetresolution: third party
2017-12-06 16:52:12serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg307754
2017-12-06 16:37:53dokocreate