Bug 2365653 - python-pytest-venv fails to build with Python 3.14: venv.create() ends with a failure; TypeError: HelpFormatter.__init__() got an unexpected keyword argument 'prefix_chars'
Summary: python-pytest-venv fails to build with Python 3.14: venv.create() ends with a...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pytest-venv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2365142
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-05-12 15:05 UTC by Karolina Surma
Modified: 2025-05-14 06:23 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-14 06:23:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-virtualenv pull-request 134 0 None None None 2025-05-12 16:35:31 UTC

Description Karolina Surma 2025-05-12 15:05:53 UTC
python-pytest-venv fails to build with Python 3.14.0b1.

All tests end with a similar failure:

__________________________ ERROR at setup of test_it ___________________________

tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_it0')

    @pytest.fixture
    def venv(tmpdir):
        venv = VirtualEnvironment(tmpdir.strpath)
>       venv.create()

../BUILDROOT/usr/lib/python3.14/site-packages/pytest_venv/__init__.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../BUILDROOT/usr/lib/python3.14/site-packages/pytest_venv/__init__.py:35: in create
    subprocess.check_call(cmd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = (['/usr/bin/python3', '-m', 'virtualenv', '-p', '/usr/bin/python3', '/tmp/pytest-of-mockbuild/pytest-0/test_it0'],)
kwargs = {}, retcode = 1
cmd = ['/usr/bin/python3', '-m', 'virtualenv', '-p', '/usr/bin/python3', '/tmp/pytest-of-mockbuild/pytest-0/test_it0']

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'virtualenv', '-p', '/usr/bin/python3', '/tmp/pytest-of-mockbuild/pytest-0/test_it0']' returned non-zero exit status 1.

/usr/lib64/python3.14/subprocess.py:419: CalledProcessError
---------------------------- Captured stderr setup -----------------------------
TypeError: HelpFormatter.__init__() got an unexpected keyword argument 'prefix_chars'


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-b1/fedora-rawhide-x86_64/09023986-python-pytest-venv/

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

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-b1/

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 1 Miro Hrončok 2025-05-12 16:35:32 UTC
This is a problem in Python:

https://github.com/python/cpython/issues/133653

Manifesting via virtualenv, fixed/workaround there in https://github.com/pypa/virtualenv/pull/2878 -- part of the recent releases, Fedora update PR in https://src.fedoraproject.org/rpms/python-virtualenv/pull-request/134

Comment 2 Lumír Balhar 2025-05-14 06:23:36 UTC
The last three builds in https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-pytest-venv/ are green. Closing.


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