python-black fails to build with Python 3.10.0a5. ====================================================================== FAIL: test_check_diff_use_together (tests.test_black.BlackTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.10/contextlib.py", line 79, in inner return func(*args, **kwds) File "/builddir/build/BUILD/black-20.8b1/tests/test_black.py", line 1483, in test_check_diff_use_together self.invokeBlack([str(src1), "--diff", "--check"], exit_code=1) File "/builddir/build/BUILD/black-20.8b1/tests/test_black.py", line 196, in invokeBlack self.assertEqual( AssertionError: 123 != 1 : Failed with args: ['--verbose', '--config', '/builddir/build/BUILD/black-20.8b1/tests/empty.toml', '/builddir/build/BUILD/black-20.8b1/tests/data/string_quotes.py', '--diff', '--check'] stdout: '' stderr: 'Traceback (most recent call last):\n File "/builddir/build/BUILD/black-20.8b1/src/black/__init__.py", line 670, in reformat_one\n if changed is not Changed.CACHED and format_file_in_place(\n File "/builddir/build/BUILD/black-20.8b1/src/black/__init__.py", line 826, in format_file_in_place\n if write_back == write_back.COLOR_DIFF:\n File "/usr/lib64/python3.10/enum.py", line 146, in __get__\n raise AttributeError(\nAttributeError: WriteBack: no attribute \'COLOR_DIFF\'\nerror: cannot format /builddir/build/BUILD/black-20.8b1/tests/data/string_quotes.py: WriteBack: no attribute \'COLOR_DIFF\'\nOh no! 💥 💔 💥\n1 file would fail to reformat.\n' exception: 123 ====================================================================== FAIL: test_expression_diff (tests.test_black.BlackTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/black-20.8b1/tests/test_black.py", line 441, in test_expression_diff self.assertEqual(result.exit_code, 0) AssertionError: 123 != 0 ====================================================================== FAIL: test_expression_diff_with_color (tests.test_black.BlackTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/black-20.8b1/tests/test_black.py", line 469, in test_expression_diff_with_color self.assertIn("\033[1;37m", actual) AssertionError: '\x1b[1;37m' not found in '' ====================================================================== FAIL: test_no_cache_when_writeback_diff (tests.test_black.BlackTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/black-20.8b1/tests/test_black.py", line 1392, in test_no_cache_when_writeback_diff self.invokeBlack([str(src), "--diff"]) File "/builddir/build/BUILD/black-20.8b1/tests/test_black.py", line 196, in invokeBlack self.assertEqual( AssertionError: 123 != 0 : Failed with args: ['--verbose', '--config', '/builddir/build/BUILD/black-20.8b1/tests/empty.toml', '/tmp/tmpkj6asb6m/test.py', '--diff'] stdout: '' stderr: 'Traceback (most recent call last):\n File "/builddir/build/BUILD/black-20.8b1/src/black/__init__.py", line 670, in reformat_one\n if changed is not Changed.CACHED and format_file_in_place(\n File "/builddir/build/BUILD/black-20.8b1/src/black/__init__.py", line 826, in format_file_in_place\n if write_back == write_back.COLOR_DIFF:\n File "/usr/lib64/python3.10/enum.py", line 146, in __get__\n raise AttributeError(\nAttributeError: WriteBack: no attribute \'COLOR_DIFF\'\nerror: cannot format /tmp/tmpkj6asb6m/test.py: WriteBack: no attribute \'COLOR_DIFF\'\nOh no! 💥 💔 💥\n1 file would fail to reformat.\n' exception: 123 ---------------------------------------------------------------------- Ran 142 tests in 29.672s FAILED (failures=4, expected failures=3) Test failed: <unittest.runner.TextTestResult run=142 errors=0 failures=4> error: Test failed: <unittest.runner.TextTestResult run=142 errors=0 failures=4> For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01966861-python-black/ For all our attempts to build python-black with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-black/ 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.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. 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.
See https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-black/