Bug 2335830 - python-lxml fails to build with Python 3.14: FileNotFoundError: [Errno 2] No such file or directory: 'file:/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/tests/test_broken.xml'
Summary: python-lxml fails to build with Python 3.14: FileNotFoundError: [Errno 2] No ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-lxml
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-01-06 15:04 UTC by Karolina Surma
Modified: 2025-01-06 16:13 UTC (History)
8 users (show)

Fixed In Version: python-lxml-5.3.0-2.fc42
Clone Of:
Environment:
Last Closed: 2025-01-06 16:13:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-lxml pull-request 45 0 None None None 2025-01-06 15:23:20 UTC
Github python cpython issues 125974 0 None open 3.14.0a1 urljoin regression wrt // 2025-01-06 15:14:03 UTC
Launchpad.net lxml/+bug/2085619 0 None None None 2025-01-06 15:14:03 UTC

Description Karolina Surma 2025-01-06 15:04:24 UTC
python-lxml fails to build with Python 3.14.0a3 (since a1) because of a test failure.
Note we have a successful build without tests.

Upstream issues:
https://bugs.launchpad.net/lxml/+bug/2085619
https://github.com/python/cpython/issues/125974

Opening this here for tracking purposes.

+ /usr/bin/python3 test.py -vuf
<snip>
======================================================================
ERROR: test_xinclude_text (lxml.tests.test_etree.ElementIncludeTestCase.test_xinclude_text)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.14/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.14/unittest/case.py", line 660, in run
    self._callTestMethod(testMethod)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib64/python3.14/unittest/case.py", line 606, in _callTestMethod
    result = method()
  File "/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/tests/test_etree.py", line 4942, in test_xinclude_text
    self.include( etree.ElementTree(root) )
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/tests/test_etree.py", line 5043, in include
    self.ElementInclude.include(tree.getroot(), loader=loader, max_depth=max_depth)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/ElementInclude.py", line 173, in include
    _include(elem, loader, base_url, max_depth)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/ElementInclude.py", line 217, in _include
    text = load_include(href, parse, encoding=e.get("encoding"))
  File "/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/ElementInclude.py", line 120, in _lxml_default_loader
    f = open(href, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'file:/builddir/build/BUILD/python-lxml-5.3.0-build/lxml-5.3.0/src/lxml/tests/test_broken.xml'

----------------------------------------------------------------------
Ran 1962 tests in 6.989s

FAILED (errors=1)

For the build logs, see:
https://download.copr.fedorainfracloud.org/results/@python/python3.14/fedora-rawhide-x86_64/08474814-python-lxml/builder-live.log.gz

For all our attempts to build python-reportlab with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-lxml/

Comment 1 Miro Hrončok 2025-01-06 15:15:51 UTC
https://github.com/lxml/lxml/commit/9e95960cd69a3e0393f4266d60a6f5a2a755de0d fixes one of the failures reported upstream. The other one might no longer happen. Will check.

Comment 2 Miro Hrončok 2025-01-06 15:23:20 UTC
OK, the other failure seems gone. https://src.fedoraproject.org/rpms/python-lxml/pull-request/45

Comment 3 Miro Hrončok 2025-01-06 16:13:06 UTC
Fixed in distgit.


Note You need to log in before you can comment on or make changes to this bug.