Fedora Account System
Red Hat Associate
Red Hat Customer
python-yapf fails to build with Python 3.16.0a2. ERROR: yapf_test (unittest.loader._FailedTest.yapf_test) ---------------------------------------------------------------------- ImportError: Failed to import test module: yapf_test Traceback (most recent call last): File "/usr/lib64/python3.16/unittest/loader.py", line 433, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.16/unittest/loader.py", line 374, in _get_module_from_name __import__(name) ~~~~~~~~~~^^^^^^ File "/builddir/build/BUILD/python-yapf-0.43.0-build/yapf-0.43.0/yapftests/yapf_test.py", line 32, in <module> from yapf.yapflib import yapf_api File "/builddir/build/BUILD/python-yapf-0.43.0-build/yapf-0.43.0/yapf/yapflib/yapf_api.py", line 38, in <module> from yapf.pyparser import pyparser File "/builddir/build/BUILD/python-yapf-0.43.0-build/yapf-0.43.0/yapf/pyparser/pyparser.py", line 44, in <module> from yapf.yapflib import format_token File "/builddir/build/BUILD/python-yapf-0.43.0-build/yapf-0.43.0/yapf/yapflib/format_token.py", line 23, in <module> from yapf.pytree import pytree_utils File "/builddir/build/BUILD/python-yapf-0.43.0-build/yapf-0.43.0/yapf/pytree/pytree_utils.py", line 30, in <module> from yapf_third_party._ylib2to3 import pygram File "/builddir/build/BUILD/python-yapf-0.43.0-build/BUILDROOT/usr/lib/python3.16/site-packages/yapf_third_party/_ylib2to3/pygram.py", line 29, in <module> python_grammar = driver.load_grammar(_GRAMMAR_FILE) File "/builddir/build/BUILD/python-yapf-0.43.0-build/BUILDROOT/usr/lib/python3.16/site-packages/yapf_third_party/_ylib2to3/pgen2/driver.py", line 242, in load_grammar g.dump(gp) ~~~~~~^^^^ File "/builddir/build/BUILD/python-yapf-0.43.0-build/BUILDROOT/usr/lib/python3.16/site-packages/yapf_third_party/_ylib2to3/pgen2/grammar.py", line 107, in dump with tempfile.NamedTemporaryFile( ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ mode='wb', ^^^^^^^^^^ ...<2 lines>... dir=tempfile_dir, ^^^^^^^^^^^^^^^^^ delete=False) as f: ^^^^^^^^^^^^^ File "/usr/lib64/python3.16/tempfile.py", line 657, in NamedTemporaryFile prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.16/tempfile.py", line 130, in _sanitize_params raise ValueError("prefix can't contain a directory component") ValueError: prefix can't contain a directory component https://docs.python.org/3.16/whatsnew/3.16.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359726-python-yapf/ For all our attempts to build python-yapf with Python 3.16, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/python-yapf/ 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.16: https://copr.fedorainfracloud.org/coprs/g/python/python3.16/ Let us know here if you have any questions. Python 3.16 is planned to be included in Fedora 47. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16. 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.