Bug 2335909 - python-pip fails to build with Python 3.14: AssertionError: assert 'file:/tmp/file' == 'file:///tmp/file'
Summary: python-pip fails to build with Python 3.14: AssertionError: assert 'file:/tmp...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pip
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 17:14 UTC by Karolina Surma
Modified: 2025-06-16 09:03 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-pip pull-request 155 0 None None None 2025-06-16 09:03:40 UTC
Github pypa pip pull 13423 0 None Draft Adjust path_to_url et al. to produce the same results on Python 3.14+ 2025-06-12 22:06:32 UTC
Github python cpython issues 135448 0 None open Python 3.14.0b2 in pip tests: Segmentation fault in mock __exit__ 2025-06-12 22:31:37 UTC

Description Karolina Surma 2025-01-06 17:14:05 UTC
python-pip fails to build with Python 3.14.0a3.

All test failures look related to /// -> / change in file directives in Python 3.14:

____________________________ test_path_to_url_unix _____________________________

    @pytest.mark.skipif("sys.platform == 'win32'")
    def test_path_to_url_unix() -> None:
>       assert path_to_url("/tmp/file") == "file:///tmp/file"
E       AssertionError: assert 'file:/tmp/file' == 'file:///tmp/file'
E         
E         - file:///tmp/file
E         ?      --
E         + file:/tmp/file

= 11 failed, 1517 passed, 27 skipped, 12 deselected, 8 xfailed, 40 warnings in 20.59s =

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08474833-python-pip/

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

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 2 Aoife Moloney 2025-02-26 13:21:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 3 Miro Hrončok 2025-06-12 21:32:39 UTC
Oh wow.

I even got:

.......................................F...........F.................... [  2%]
.......F................................................................ [  5%]
.......x.x....x...X.............................X....................... [  8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 17%]
........................................................................ [ 20%]
...................................................................ss... [ 23%]
.sss...sss................F.................sF...........sssFssF........ [ 26%]
....................Fatal Python error: Segmentation fault

Thread 0x00007f34af3ff6c0 [python3] (most recent call first):
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 534 in read
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 567 in from_io
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 1160 in _thread_receiver
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 341 in run
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 411 in _perform_spawn

Current thread 0x00007f34b0911bc0 [python3] (most recent call first):
  File "/usr/lib64/python3.14/unittest/mock.py", line 1630 in __exit__
  File "/builddir/build/BUILD/python-pip-25.1.1-build/pip-25.1.1/tests/unit/test_collector.py", line 870 in test_get_index_content_directory_append_index
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 159 in pytest_pyfunc_call
  File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 1627 in runtest
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 174 in pytest_runtest_call
  File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 242 in <lambda>
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 341 in from_call
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 241 in call_and_report
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/lib/python3.14/site-packages/xdist/remote.py", line 227 in run_one_test
  File "/usr/lib/python3.14/site-packages/xdist/remote.py", line 206 in pytest_runtestloop
  File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 337 in _main
  File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 283 in wrap_session
  File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/usr/lib/python3.14/site-packages/xdist/remote.py", line 427 in <module>
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 1291 in executetask
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 341 in run
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 411 in _perform_spawn
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 389 in integrate_as_primary_thread
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 1273 in serve
  File "/usr/lib/python3.14/site-packages/execnet/gateway_base.py", line 1806 in serve
  File "<string>", line 8 in <module>
  File "<string>", line 1 in <module>

Current thread's C stack trace (most recent call first):
  Binary file "/lib64/libpython3.14.so.1.0", at _Py_DumpStack+0x4c [0x7f34b031e7dc]
  Binary file "/lib64/libpython3.14.so.1.0", at +0x11f260 [0x7f34b031f260]
  Binary file "/lib64/libc.so.6", at +0x19bf0 [0x7f34b0028bf0]
  Binary file '<unknown>' [0x7f34b084c650]

Extension modules: markupsafe._speedups (total: 1)
[gw2] node down: Not properly terminated
F
replacing crashed worker gw2
.......x................................................................ [ 30%]
..................................xxx.x................................s [ 33%]
s......s................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
.................................x...........................F..F....... [ 48%]
.ss.s.....F.F........................................................... [ 51%]
.................................................................F...... [ 54%]
......................................................Fs.sss..s......... [ 57%]
....................................................x................... [ 60%]
........................................................................ [ 63%]
........................................................................ [ 66%]
.....................................................s.................. [ 69%]
........................................................................ [ 72%]
........................................................................ [ 75%]
...............x.x.x.......x............................................ [ 78%]
........................................................................ [ 81%]
........................................................................ [ 84%]
........................................................................ [ 86%]
..............................................sss....................... [ 89%]
.....................................................................sss [ 92%]
....................F................................................... [ 95%]
........................................................................ [ 98%]
.....................s......                                             [100%]

In a local mock build.

Comment 4 Miro Hrončok 2025-06-12 21:33:47 UTC
And even in Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=133875457

Comment 5 Miro Hrončok 2025-06-12 22:06:32 UTC
This fixes all the failures sans the segfault: https://github.com/pypa/pip/pull/13423

Comment 6 Miro Hrončok 2025-06-12 22:31:37 UTC
Here¨s the crash report https://github.com/python/cpython/issues/135448


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