test failure with libxml2 2.11.1

Bug #2018522 reported by David Anes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
scoder

Bug Description

While attempting to build lxml against the recently released libxml2 2.11.1:

[ 253s] Doctest: xpathxslt.txt
[ 253s] ======================================================================
[ 253s] ERROR: test_iterparse_utf16_bom (lxml.tests.test_io.ETreeIOTestCase)
[ 253s] ----------------------------------------------------------------------
[ 253s] Traceback (most recent call last):
[ 253s] File "/usr/lib64/python3.9/unittest/case.py", line 59, in testPartExecutor
[ 253s] yield
[ 253s] File "/usr/lib64/python3.9/unittest/case.py", line 592, in run
[ 253s] self._callTestMethod(testMethod)
[ 253s] File "/usr/lib64/python3.9/unittest/case.py", line 550, in _callTestMethod
[ 253s] method()
[ 253s] File "/home/abuild/rpmbuild/BUILD/lxml-4.9.2/src/lxml/tests/test_io.py", line 322, in test_iterparse_utf16_bom
[ 253s] elements = [el for _, el in self.etree.iterparse(f.name)]
[ 253s] File "/home/abuild/rpmbuild/BUILD/lxml-4.9.2/src/lxml/tests/test_io.py", line 322, in <listcomp>
[ 253s] elements = [el for _, el in self.etree.iterparse(f.name)]
[ 253s] File "src/lxml/iterparse.pxi", line 210, in lxml.etree.iterparse.__next__
[ 253s] raise error
[ 253s] File "src/lxml/iterparse.pxi", line 195, in lxml.etree.iterparse.__next__
[ 253s] done = self._read_more_events(context)
[ 253s] File "src/lxml/nsclasses.pxi", line 230, in lxml.etree.FunctionNamespace
[ 253s] return __FUNCTION_NAMESPACE_REGISTRIES[ns_utf]
[ 253s] File "src/lxml/parser.pxi", line 1379, in lxml.etree._FeedParser.feed
[ 253s] context._handleParseResult(self, pctxt.myDoc, None)
[ 253s] File "src/lxml/parser.pxi", line 609, in lxml.etree._ParserContext._handleParseResult
[ 253s] c_doc = self._handleParseResultDoc(parser, result, filename)
[ 253s] File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc
[ 253s] return _handleParseResult(self, self._c_ctxt, result,
[ 253s] File "src/lxml/parser.pxi", line 728, in lxml.etree._handleParseResult
[ 253s] _raiseParseError(c_ctxt, filename, context._error_log)
[ 253s] File "src/lxml/parser.pxi", line 657, in lxml.etree._raiseParseError
[ 253s] raise error_log._buildParseException(
[ 253s] File "/tmp/tmp4pmacbxe", line 1
[ 253s] lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1

The release notes of libxml2 2.11.1 state a lot of symbols and deprecated functions are now removed, and also some security patches were addressed which may contribute to this issue.

I'm not sure the best way to handle this error. Any advice?

Revision history for this message
scoder (scoder) wrote :

This might(!) get fixed with the next libxml2 release, 2.11.3, assuming that this is related:

https://gitlab.gnome.org/GNOME/libxml2/-/commit/3463063001f36c16e5f6ce9ad33cd12a376fc874

Now that there is a 2.11.x release series, I'll probably use it for the lxml 5.0 binary wheels.

Changed in lxml:
importance: Undecided → Low
milestone: none → 5.0
status: New → Triaged
Revision history for this message
Nick Wellnhofer (nick-aevum) wrote :
Revision history for this message
scoder (scoder) wrote :

Fixed by using libxml2 2.11.5.

Changed in lxml:
assignee: nobody → scoder (scoder)
status: Triaged → Fix Committed
scoder (scoder)
Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.