python-jedi fails to build with Python 3.10.0a2. ________________________ test_find_system_environments _________________________ def test_find_system_environments(): envs = list(find_system_environments()) > assert len(envs) E assert 0 E + where 0 = len([]) test/test_api/test_environment.py:19: AssertionError ______________________ test_completion_param_annotations _______________________ def test_completion_param_annotations(): # Need to define this function not directly in Python. Otherwise Jedi is too # clever and uses the Python code instead of the signature object. code = 'def foo(a: 1, b: str, c: int = 1.0) -> bytes: pass' exec(code, locals()) script = jedi.Interpreter('foo', [locals()]) c, = script.complete() sig, = c.get_signatures() a, b, c = sig.params assert a.infer() == [] > assert [d.name for d in b.infer()] == ['str'] E AssertionError: assert [] == ['str'] E Right contains one more item: 'str' E Use -v to get the full diff test/test_api/test_interpreter.py:316: AssertionError __________________ test_compiled_signature_annotation_string ___________________ def test_compiled_signature_annotation_string(): import typing def func(x: typing.Type, y: typing.Union[typing.Type, int]): pass func.__name__ = 'not_func' s, = jedi.Interpreter('func()', [locals()]).get_signatures(1, 5) > assert s.params[0].description == 'param x: Type' E assert "param x: 'typing.Type'" == 'param x: Type' E - param x: Type E + param x: 'typing.Type' test/test_inference/test_mixed.py:113: AssertionError ===== 3 failed, 1451 passed, 20 skipped, 2 deselected, 5 xfailed in 42.38s ===== I understand the third failure: typing names/repor have been changed in Python 3.10. For the first two failures, I have no clue. For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01756883-python-jedi/ For all our attempts to build python-jedi with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-jedi/ 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.
Latest upstream commit behaves the same. Bumping the severity here, an entire stack ipython stack depends on it.
Petr, could you please take this upstream?
Upstream issue created: https://github.com/davidhalter/jedi/issues/1732 Unfortunately, it seems that the fix will be much more complex than just adapting tests to new outputs.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
This is getting complex because there aren't just compatibilities with Python 3.10 but also a need to implement support for the new pattern-matching syntax. I took this bug in a good faith that I'll be able to move it further or fix the problem entirely but I'm not able to do so.
Ha, I forget that I'm the main admin of this package, lol
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/
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.
FTR the actual blocker is in the parso project: https://github.com/davidhalter/parso/issues/138 Honestly, it seems that I won't be able to dive into it and come up with some solution. But the discussions upstream are kinda active so hopefully, I won't have to.
I've tested ipython with Python 3.10 and there is no real issue caused by incompatible jedi. The only thing is that the new syntax Python 3.10 brings is not highlighted at all.
I've just skipped the failing tests so the package builds again in rawhide.
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle. Changing version to 35.
https://koji.fedoraproject.org/koji/buildinfo?buildID=1860492