Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710684 - dev-python/python-language-server-0.31.8: pkg_resources.ContextualVersionConflict: (jedi 0.12.1 (/usr/lib64/python3.6/site-packages), Requirement.parse('jedi<0.16,>=0.14.1'), {'python-language-server'})
Summary: dev-python/python-language-server-0.31.8: pkg_resources.ContextualVersionConf...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-02-24 18:38 UTC by WGH
Modified: 2020-02-25 14:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description WGH 2020-02-24 18:38:37 UTC
dev-python/python-language-server installed succesfully on my machine, but refused to work:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jedi 0.12.1 (/usr/lib64/python3.6/site-packages), Requirement.parse('jedi<0.16,>=0.14.1'), {'python-language-server'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/pyls", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'jedi<0.16,>=0.14.1' distribution was not found and is required by python-language-server

The reason is that I had dev-python/jedi-0.12.1::gentoo installed (which is currently stable), but pyls requires newer version (the newer version are in the tree, but currently unstable), as specified in its setup.py: https://github.com/palantir/python-language-server/blob/f6df42cae186e5389e0332e9b8406bb24bd84d3e/setup.py#L38

I think the fix would be to just copy proper version bounds from the setup.py to .ebuild. I will submit the patch.
Comment 2 Larry the Git Cow gentoo-dev 2020-02-25 14:51:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2950f52fbd4d3e6657af8e33d059484e91c51fc0

commit 2950f52fbd4d3e6657af8e33d059484e91c51fc0
Author:     WGH <wgh@torlan.ru>
AuthorDate: 2020-02-24 18:45:54 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-02-25 14:50:34 +0000

    dev-python/python-language-server: fix dep versions
    
    Copy dependency version bounds from the upstream setup.py:
    https://github.com/palantir/python-language-server/blob/0.31.8/setup.py#L38
    
    This fixes the problem when e.g. older jedi satisfies the ebuild
    dependency, but the package itself checks dependency specified it
    in its setup.py at runtime, refusing to work on mismatch (see #710684).
    If pyls silently accepted wrong package version it could've been worse,
    though.
    
    Closes: https://bugs.gentoo.org/710684
    Signed-off-by: Maxim Plotnikov <wgh@torlan.ru>
    Closes: https://github.com/gentoo/gentoo/pull/14761
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../python-language-server/python-language-server-0.31.8.ebuild   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)