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.
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/
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.
*** Bug 1841659 has been marked as a duplicate of this bug. ***
The current error is different and I believe t has been fixed in https://github.com/pre-commit/pre-commit/pull/1480
Yet backporting that only uncovers the previous error and I cannot reproduce it from git w/tox.
This "simply" needs new virtualenv.
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/