Bug 2250838

Summary: python-lxml: FTBFS in Fedora Rawhide (since libxml2 2.12)
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-lxmlAssignee: Python Maintainers <python-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: amigadave, cstratak, igor.raits, ksurma, lbalhar, me, mizdebsk, python-maint, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://koschei.fedoraproject.org/package/python-lxml
Whiteboard:
Fixed In Version: python-lxml-4.9.3-4.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-27 12:36:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2231791, 2244836    

Description Miro Hrončok 2023-11-21 11:39:35 UTC
Package python-lxml fails to build from source in Fedora Rawhide.

Version-Release number of selected component:
4.9.3-3.fc40

Reproducible: Always

Steps to Reproduce:
1. fedpkg build --scratch

Actual Results:  
======================================================================
FAIL: test_illegal_utf8_recover (lxml.tests.test_unicode.EncodingsTestCase.test_illegal_utf8_recover)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/lxml-4.9.3/src/lxml/tests/test_unicode.py", line 170, in test_illegal_utf8_recover
    self.assertRaises(etree.XMLSyntaxError, etree.fromstring, data, parser)
  File "/usr/lib64/python3.12/unittest/case.py", line 778, in assertRaises
    return context.handle('assertRaises', args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/unittest/case.py", line 237, in handle
    with self:
  File "/usr/lib64/python3.12/unittest/case.py", line 260, in __exit__
    self._raiseFailure("{} not raised by {}".format(exc_name,
  File "/usr/lib64/python3.12/unittest/case.py", line 200, in _raiseFailure
    raise self.test_case.failureException(msg)
AssertionError: XMLSyntaxError not raised by fromstring
----------------------------------------------------------------------
Ran 1943 tests in 6.072s
FAILED (failures=1)

Expected Results:  
All tests pass.

This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-lxml

The first failed build updated libxml2 from 2.11.5 to 2.12.0.

Comment 1 Fedora Update System 2023-11-27 09:36:43 UTC
FEDORA-2023-85f1d6dc15 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-85f1d6dc15

Comment 2 Fedora Update System 2023-11-27 12:36:42 UTC
FEDORA-2023-85f1d6dc15 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.