Bug 2196798 - python-pytest-venv fails to build with Python 3.12: subprocess.CalledProcessError: Command /tmp/pytest-of-mockbuild/pytest-0/test_it_installs_editable_dep0/bin/python -m pip install -e /builddir/build/BUILD/pytest-venv-0.2/tests/myapp
Summary: python-pytest-venv fails to build with Python 3.12: subprocess.CalledProcessE...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pytest-venv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2023-05-10 09:15 UTC by Tomáš Hrnčiar
Modified: 2023-07-12 13:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-12 13:46:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2023-05-10 09:15:15 UTC
python-pytest-venv fails to build with Python 3.12.0a7.

=================================== FAILURES ===================================
________________________ test_it_installs_editable_dep _________________________

venv = <pytest_venv.VirtualEnvironment object at 0x7f973495f770>

    def test_it_installs_editable_dep(venv):
>       venv.install(os.path.join(here, 'myapp'), editable=True)

tests/test_it.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-pytest-venv-0.2-9.fc39.x86_64/usr/lib/python3.12/site-packages/pytest_venv/__init__.py:41: in install
    subprocess.check_call(cmd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = (['/tmp/pytest-of-mockbuild/pytest-0/test_it_installs_editable_dep0/bin/python', '-m', 'pip', 'install', '-e', '/builddir/build/BUILD/pytest-venv-0.2/tests/myapp'],)
kwargs = {}, retcode = 1
cmd = ['/tmp/pytest-of-mockbuild/pytest-0/test_it_installs_editable_dep0/bin/python', '-m', 'pip', 'install', '-e', '/builddir/build/BUILD/pytest-venv-0.2/tests/myapp']

    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 '['/tmp/pytest-of-mockbuild/pytest-0/test_it_installs_editable_dep0/bin/python', '-m', 'pip', 'install', '-e', '/builddir/build/BUILD/pytest-venv-0.2/tests/myapp']' returned non-zero exit status 1.

/usr/lib64/python3.12/subprocess.py:413: CalledProcessError
=========================== short test summary info ============================
FAILED tests/test_it.py::test_it_installs_editable_dep - subprocess.CalledPro...
================== 1 failed, 3 passed, 2 deselected in 10.40s ==================

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05902880-python-pytest-venv/

For all our attempts to build python-pytest-venv with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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 Tomas Orsava 2023-05-24 12:30:38 UTC
This package is only needed to test micropipenv during check.

Comment 2 Lumír Balhar 2023-06-07 13:03:56 UTC
The problem is that one of the tests needs setuptools which is no longer in virtual environments by default.

https://src.fedoraproject.org/rpms/python-pytest-venv/pull-request/2#

Comment 3 Lumír Balhar 2023-07-12 13:46:28 UTC
The problem has been fixed by the downstream patch proposed upstream and it's available in rawhide built with Python 3.12.


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