Bug 2251781

Summary: python-virtualenv fails to build with Python 3.13: 11 tests failed
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-virtualenvAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, ksurma, lbalhar, mhroncok, mrunge, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-virtualenv-20.21.1-7.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-04 19:34:54 UTC Type: Bug
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: 2244836    

Description Karolina Surma 2023-11-27 15:02:08 UTC
python-virtualenv fails to build with Python 3.13.0a1.

This report is automated and not very verbose, but we'll try to get back here with details.

See the giant build report with the details of the failures: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06692263-python-virtualenv/builder-live.log.gz 

FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-copies-isolated]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-symlinks-isolated]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-symlinks-isolated]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-copies-global]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-symlinks-global]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-copies-global]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-copies-isolated]
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-symlinks-global]
FAILED tests/unit/create/via_global_ref/builtin/cpython/test_cpython3_win.py::test_only_shim[cpython3_win_embed]
FAILED tests/unit/create/via_global_ref/builtin/cpython/test_cpython3_win.py::test_2_exe_on_default_py_host[cpython3_win_embed]
FAILED tests/unit/create/via_global_ref/builtin/cpython/test_cpython3_win.py::test_3_exe_on_not_default_py_host[cpython3_win_embed]
=== 11 failed, 228 passed, 34 skipped, 62 deselected, 14 warnings in 28.69s ====


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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06692263-python-virtualenv/

For all our attempts to build python-virtualenv with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-virtualenv/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 1 Miro Hrončok 2023-11-28 11:49:50 UTC
This happens for all of the 8 test_create_no_seed failures:

>       assert git_ignore.splitlines() == ["# created by virtualenv automatically", "*"]
E       AssertionError: assert ['# Created by venv; see https://docs.python.org/3/library/venv.html', '*'] == ['# created by virtualenv automatically', '*']
E         At index 0 diff: '# Created by venv; see https://docs.python.org/3/library/venv.html' != '# created by virtualenv automatically'
E         Full diff:
E         - ['# created by virtualenv automatically', '*']
E         + ['# Created by venv; see https://docs.python.org/3/library/venv.html', '*']


The other three are related to Windows. No idea why they even run on Linux :/

Comment 2 Miro Hrončok 2023-11-28 11:53:01 UTC
I can reproduce the issues running from upstream git HEAD.

Comment 3 Miro Hrončok 2023-11-28 12:09:04 UTC
Reported the 2 kinds of failures separately upstream:

https://github.com/pypa/virtualenv/issues/2670 -- test_create_no_seed
https://github.com/pypa/virtualenv/issues/2671 -- cpython3_win_embed

Comment 4 Miro Hrončok 2023-11-29 22:12:24 UTC
Upstream fix of both: https://github.com/pypa/virtualenv/pull/2673

Will wait for an upstream review before backporting.

Comment 5 Lumír Balhar 2023-12-04 13:28:08 UTC
I'm working at the backport.

Comment 7 Fedora Update System 2023-12-04 19:32:46 UTC
FEDORA-2023-d0d67336cd has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d0d67336cd

Comment 8 Fedora Update System 2023-12-04 19:34:54 UTC
FEDORA-2023-d0d67336cd has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.