Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1836333 - pre-commit fails to build with Python 3.9: 3 test failures related to python.healthy
Summary: pre-commit fails to build with Python 3.9: 3 test failures related to python....
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pre-commit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1841659 (view as bug list)
Depends On: 1742034
Blocks: F33FTBFS F33FailsToInstall PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-05-15 16:08 UTC by Miro Hrončok
Modified: 2020-06-22 13:12 UTC (History)
9 users (show)

Fixed In Version: pre-commit-2.5.1-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-22 13:12:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-05-15 16:08:18 UTC
pre-commit fails to build with Python 3.9.0a6.

=================================== FAILURES ===================================
_________________________ test_healthy_default_creator _________________________
python_dir = (Prefix(prefix_dir='/tmp/pytest-of-mockbuild/pytest-0/test_healthy_default_creator0/prefix'), local('/tmp/pytest-of-mockbuild/pytest-0/test_healthy_default_creator0'))
    def test_healthy_default_creator(python_dir):
        prefix, tmpdir = python_dir
    
        python.install_environment(prefix, C.DEFAULT, ())
    
        # should be healthy right after creation
>       assert python.healthy(prefix, C.DEFAULT) is True
E       AssertionError: assert False is True
E        +  where False = <function healthy at 0x7fbe3b7b0f70>(Prefix(prefix_dir='/tmp/pytest-of-mockbuild/pytest-0/test_healthy_default_creator0/prefix'), 'default')
E        +    where <function healthy at 0x7fbe3b7b0f70> = python.healthy
E        +    and   'default' = C.DEFAULT
/builddir/build/BUILD/pre-commit-2.4.0/tests/languages/python_test.py:84: AssertionError
__________________________ test_healthy_venv_creator ___________________________
python_dir = (Prefix(prefix_dir='/tmp/pytest-of-mockbuild/pytest-0/test_healthy_venv_creator0/prefix'), local('/tmp/pytest-of-mockbuild/pytest-0/test_healthy_venv_creator0'))
    def test_healthy_venv_creator(python_dir):
        # venv creator produces slightly different pyvenv.cfg
        prefix, tmpdir = python_dir
    
        with envcontext((('VIRTUALENV_CREATOR', 'venv'),)):
            python.install_environment(prefix, C.DEFAULT, ())
    
>       assert python.healthy(prefix, C.DEFAULT) is True
E       AssertionError: assert False is True
E        +  where False = <function healthy at 0x7fbe3b7b0f70>(Prefix(prefix_dir='/tmp/pytest-of-mockbuild/pytest-0/test_healthy_venv_creator0/prefix'), 'default')
E        +    where <function healthy at 0x7fbe3b7b0f70> = python.healthy
E        +    and   'default' = C.DEFAULT
/builddir/build/BUILD/pre-commit-2.4.0/tests/languages/python_test.py:98: AssertionError
________________________ test_unhealthy_old_virtualenv _________________________
python_dir = (Prefix(prefix_dir='/tmp/pytest-of-mockbuild/pytest-0/test_unhealthy_old_virtualenv0/prefix'), local('/tmp/pytest-of-mockbuild/pytest-0/test_unhealthy_old_virtualenv0'))
    def test_unhealthy_old_virtualenv(python_dir):
        prefix, tmpdir = python_dir
    
        python.install_environment(prefix, C.DEFAULT, ())
    
        # simulate "old" virtualenv by deleting this file
>       os.remove(prefix.path('py_env-default/pyvenv.cfg'))
E       FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-mockbuild/pytest-0/test_unhealthy_old_virtualenv0/prefix/py_env-default/pyvenv.cfg'
/builddir/build/BUILD/pre-commit-2.4.0/tests/languages/python_test.py:141: FileNotFoundError
============ 3 failed, 474 passed, 122 deselected in 180.07 seconds ============

I don't know yet what's the problem.

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01381798-pre-commit/

For all our attempts to build pre-commit with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/pre-commit/

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

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
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 2020-05-25 13:01:15 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Comment 2 Miro Hrončok 2020-05-29 07:11:21 UTC
Python 3.9 update: The f33-python side tag is currently being merged.

New builds in f33-python are no longer possible, but python3 is not yet updated to Python 3.9 in rawhide. You can check when Python is Python 3.9 with:

    $ koji wait-repo f33-build --build python3.9-3.9.0~b1-3.fc3

And build the packages normally after that.

Comment 3 Miro Hrončok 2020-06-01 10:32:56 UTC
*** Bug 1841659 has been marked as a duplicate of this bug. ***

Comment 4 Miro Hrončok 2020-06-08 16:35:09 UTC
The current error is different and I believe t has been fixed in https://github.com/pre-commit/pre-commit/pull/1480

Comment 5 Miro Hrončok 2020-06-08 17:32:58 UTC
Yet backporting that only uncovers the previous error and I cannot reproduce it from git w/tox.

Comment 6 Miro Hrončok 2020-06-08 19:39:37 UTC
This "simply"  needs new virtualenv.

Comment 7 Lumír Balhar 2020-06-09 06:32:25 UTC
Update to 2.5.0: https://src.fedoraproject.org/rpms/pre-commit/pull-request/2

Successful rebuild with the latest virtualenv: https://copr.fedorainfracloud.org/coprs/lbalhar/virtualenv/build/1432981/


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