FS#65868 - [python-language-server] requires python-jedi<0.16

Attached to Project: Community Packages
Opened by Svyatoslav Gryaznov (nightuser) - Tuesday, 17 March 2020, 19:31 GMT
Last edited by Morten Linderud (Foxboron) - Thursday, 14 May 2020, 10:39 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Morten Linderud (Foxboron)
Maxim Baz (maximbaz)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 16
Private No

Details

Description:

After the update of python-jedi to the latest 0.16 version, python-language-server stopped working because it requires jedi<0.16.

pyls exits with an error:
pkg_resources.DistributionNotFound: The 'jedi<0.16,>=0.14.1' distribution was not found and is required by python-language-server
This task depends upon

Closed by  Morten Linderud (Foxboron)
Thursday, 14 May 2020, 10:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-language-server-0.32.0-1 has been pushed
Comment by Yauhen (actionless) - Saturday, 28 March 2020, 15:54 GMT
IMO two action points should come as a follow up for this ticket:
1) in `python-language-server` deps `python-jedi` should be replaced to `python-jedi<0.16,python-jedi>=0.14.1` as in its own `setup.py`
2) `python-jedi` should be downgraded to 0.15 as there are no other packages who depend on python-jedi>=0.16
Comment by hrehfeld (hrehfeld) - Tuesday, 21 April 2020, 12:37 GMT
Status on this? It's really annoying :(
Comment by Morten Linderud (Foxboron) - Tuesday, 21 April 2020, 12:45 GMT Comment by Eike (trallafitti) - Friday, 24 April 2020, 11:53 GMT
I agree with Yauhen. Until the pyls merge request (https://github.com/palantir/python-language-server/pull/781) is finished and they explicitly state jedi>=1.16 as a dependency, the package dependency should be python-jedi<0.16,python-jedi>=0.14.1 and if no conflicting packages exist, jedi should be downgraded.
Comment by Morten Linderud (Foxboron) - Friday, 24 April 2020, 11:55 GMT
Open a bugreport towards python-jedi if you think jedi should be downgraded. Also check that it doesn't break any reverse dependencies before doing so.
Comment by Eike (trallafitti) - Friday, 24 April 2020, 11:56 GMT
There was a bug report which was closed as a duplicate of this one.
Comment by Morten Linderud (Foxboron) - Friday, 24 April 2020, 11:58 GMT
 FS#66247  is not a bugreport discussing if python-jedi should be downgraded, of course it was closed as a duplicate.
Comment by Eike (trallafitti) - Friday, 24 April 2020, 12:05 GMT
Fair enough. I know how to search for reverse dependencies using pactree, but not how to get the version requirements of those dependencies.
Comment by Morten Linderud (Foxboron) - Friday, 24 April 2020, 12:09 GMT
You can't. You need to test the packages with a downgraded package.
Comment by Eike (trallafitti) - Friday, 24 April 2020, 12:10 GMT
Alright. As there are only 7 packages depending on python-jedi, I may have time to do this after work. Thank you.
Comment by Morten Linderud (Foxboron) - Friday, 24 April 2020, 20:40 GMT
You can't. You need to test the packages with a downgraded package.
Comment by Daniel M. Capella (polyzen) - Friday, 24 April 2020, 21:45 GMT
> Fair enough. I know how to search for reverse dependencies using pactree, but not how to get the version requirements of those dependencies.

You would look for version specifiers, eg.
https://github.com/palantir/python-language-server/blob/0.31.10/setup.py#L38

https://www.python.org/dev/peps/pep-0440/#version-specifiers
https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies
https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies

> Alright. As there are only 7 packages depending on python-jedi, I may have time to do this after work. Thank you.

At this point, you're probably better off testing https://github.com/palantir/python-language-server/pull/781 to see if there's anything missing. I think this will be merged and released shortly, but if not it could be backported.

The other option would have been to make a `python-jedi0151` package for the meantime.
Comment by Eike (trallafitti) - Wednesday, 29 April 2020, 16:48 GMT
This pull request (https://github.com/palantir/python-language-server/pull/781) has seen no changes in the last 11 days and there is no feedback on it being ready to merge. It looks finished though, so I refrained from searching for python-jedi0.15.1 conflicts.

I don't know if it takes less effort to just introduce a temporary python-jedi0151 package, but if this pull request remains unmerged, I have no problems looking up the version specifiers of all python-jedi dependencies during the weekend.
Comment by Daniel M. Capella (polyzen) - Wednesday, 29 April 2020, 20:45 GMT
As it seems pyls is the only package that needs 0.15.1, a better option than a python-jedi0151 package was suggested:
"<heftig|M> or ship jedi 0.15 with it (either a renamed module or by installing it in another path and editing sys.path)"
Comment by Harish Rajagopal (rharish) - Tuesday, 05 May 2020, 04:04 GMT
Is it possible to apply that pull request as a patch? This was suggested here: https://github.com/palantir/python-language-server/pull/781#issuecomment-623198876. It looks like OpenSUSE is also doing it.
Comment by Eike (trallafitti) - Sunday, 10 May 2020, 17:40 GMT
The pull request (https://github.com/palantir/python-language-server/pull/781) has finally been merged, but a new release only happens when this milestone (https://github.com/palantir/python-language-server/milestone/17) is reached.
Either we build the package from the current develop branch or we wait for the milestone.
Comment by Eike (trallafitti) - Thursday, 14 May 2020, 09:27 GMT
Milestone is finished, 0.32.0 is out. Support for current jedi versions should be implemented.
The supported jedi version is specified as jedi>=0.17.0,<0.18.0.

Loading...