pyflakes fails to build with Python 3.10.0a5. =================================== FAILURES =================================== ________________________ CheckTests.test_eofSyntaxError ________________________ self = <pyflakes.test.test_api.CheckTests testMethod=test_eofSyntaxError> def test_eofSyntaxError(self): """ The error reported for source files which end prematurely causing a syntax error reflects the cause for the syntax error. """ with self.makeTempFile("def foo(") as sourcePath: if PYPY: result = """\ %s:1:7: parenthesis is never closed def foo( ^ """ % (sourcePath,) else: result = """\ %s:1:9: unexpected EOF while parsing def foo( ^ """ % (sourcePath,) > self.assertHasErrors( sourcePath, [result]) pyflakes/test/test_api.py:483: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pyflakes/test/test_api.py:379: in assertHasErrors self.assertEqual( E AssertionError: Tuples differ: (1, "/tmp/tmpaxh8q5bq:1:8: '(' was never closed\ndef foo(\n ^\n") != (1, '/tmp/tmpaxh8q5bq:1:9: unexpected EOF while parsing\ndef foo(\n ^\n') E E First differing element 1: E "/tmp/tmpaxh8q5bq:1:8: '(' was never closed\ndef foo(\n ^\n" E '/tmp/tmpaxh8q5bq:1:9: unexpected EOF while parsing\ndef foo(\n ^\n' E E - (1, "/tmp/tmpaxh8q5bq:1:8: '(' was never closed\ndef foo(\n ^\n") E + (1, '/tmp/tmpaxh8q5bq:1:9: unexpected EOF while parsing\ndef foo(\n ^\n') _____________________ CheckTests.test_multilineSyntaxError _____________________ self = <pyflakes.test.test_api.CheckTests testMethod=test_multilineSyntaxError> def test_multilineSyntaxError(self): """ Source which includes a syntax error which results in the raised L{SyntaxError.text} containing multiple lines of source are reported with only the last line of that source. """ source = """\ def foo(): ''' def bar(): pass def baz(): '''quux''' """ # Sanity check - SyntaxError.text should be multiple lines, if it # isn't, something this test was unprepared for has happened. def evaluate(source): exec(source) try: > evaluate(source) pyflakes/test/test_api.py:441: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = "def foo():\n '''\n\ndef bar():\n pass\n\ndef baz():\n '''quux'''\n" def evaluate(source): > exec(source) E File "<string>", line 8 E '''quux''' E ^ E SyntaxError: unterminated triple-quoted string literal (detected at line 8) pyflakes/test/test_api.py:439: SyntaxError During handling of the above exception, another exception occurred: self = <pyflakes.test.test_api.CheckTests testMethod=test_multilineSyntaxError> def test_multilineSyntaxError(self): """ Source which includes a syntax error which results in the raised L{SyntaxError.text} containing multiple lines of source are reported with only the last line of that source. """ source = """\ def foo(): ''' def bar(): pass def baz(): '''quux''' """ # Sanity check - SyntaxError.text should be multiple lines, if it # isn't, something this test was unprepared for has happened. def evaluate(source): exec(source) try: evaluate(source) except SyntaxError: e = sys.exc_info()[1] if not PYPY: > self.assertTrue(e.text.count('\n') > 1) E AssertionError: False is not true pyflakes/test/test_api.py:445: AssertionError =========================== short test summary info ============================ FAILED pyflakes/test/test_api.py::CheckTests::test_eofSyntaxError - Assertion... FAILED pyflakes/test/test_api.py::CheckTests::test_multilineSyntaxError - Ass... =========== 2 failed, 692 passed, 37 skipped, 3 deselected in 2.71s ============ For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01955298-pyflakes/ For all our attempts to build pyflakes with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/pyflakes/ 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.
Upstream issue: https://github.com/PyCQA/pyflakes/issues/613
Upstream says we can send a patch because they usually wait for beta release :)
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla. The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide. You can either build the package in the side tag, with: $ fedpkg build --target=f35-python Or you can the build and we will eventually build it for you. Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away. Thanks. See also https://fedoraproject.org/wiki/Changes/Python3.10 If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/
Upstream bug is resolved in https://github.com/PyCQA/pyflakes/pull/635. I have posted a PR that rebases the corresponding commit on the 2.2.0 release and incorporates it as a patch, fixing the Python 3.10 build: https://src.fedoraproject.org/rpms/pyflakes/pull-request/11
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.
This package was successfully rebuilt with Python 3.10. If you need this bugzilla open for tracking purposes, sorry for the automatic closing: feel free to reopen it.