Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1898081 - python-jedi fails to build with Python 3.10: three tests fail [built without tests first]
Summary: python-jedi fails to build with Python 3.10: three tests fail [built without ...
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-jedi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Petr Hracek
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
Reported: 2020-11-16 10:38 UTC by Miro Hrončok
Modified: 2022-07-03 06:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

Description Miro Hrončok 2020-11-16 10:38:41 UTC
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/ 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 [ 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/ 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]):
        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/ 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:

For all our attempts to build python-jedi with Python 3.10, see:

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:

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.

Comment 1 Miro Hrončok 2020-11-18 11:14:55 UTC
Latest upstream commit behaves the same. Bumping the severity here, an entire stack ipython stack depends on it.

Comment 2 Miro Hrončok 2020-12-11 14:45:27 UTC
Petr, could you please take this upstream?

Comment 3 Lumír Balhar 2021-01-12 09:45:05 UTC
Upstream issue created:

Unfortunately, it seems that the fix will be much more complex than just adapting tests to new outputs.

Comment 4 Ben Cotton 2021-02-09 16:11:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Lumír Balhar 2021-04-06 06:31:05 UTC
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.

Comment 6 Lumír Balhar 2021-04-06 06:32:47 UTC
Ha, I forget that I'm the main admin of this package, lol

Comment 7 Miro Hrončok 2021-06-04 20:12:43 UTC
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.


See also

If you have general questions about the rebuild, please use this mailing list thread:

Comment 8 Miro Hrončok 2021-06-07 22:57:43 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 9 Lumír Balhar 2021-06-17 06:55:43 UTC
FTR the actual blocker is in the parso project:

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.

Comment 10 Lumír Balhar 2021-06-24 10:20:28 UTC
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.

Comment 11 Fedora Admin user for bugzilla script actions 2022-07-03 06:42:53 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Note You need to log in before you can comment on or make changes to this bug.