You are not logged in.

#1 2020-04-27 01:19:19

morgoth_bauglir
Member
Registered: 2014-06-26
Posts: 7

python-poetry depends on an uncompatible version of python-tomlkit

The package python-poetry depends on python-tomlkit, but with a version constraint:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 792, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (tomlkit 0.6.0 (/usr/lib/python3.8/site-packages), Requirement.parse('tomlkit<0.6.0,>=0.5.11'), {'poetry'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/poetry", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3259, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3242, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3271, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 586, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'tomlkit<0.6.0,>=0.5.11' distribution was not found and is required by poetry

python-tomlkit was updated to 0.6.0, which renders python-poetry unusable.

Offline

#2 2020-04-27 01:36:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: python-poetry depends on an uncompatible version of python-tomlkit

I can confirm this - it does seem to be a packaging bug, you could raise it on the bug tracker.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2020-04-27 02:29:58

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: python-poetry depends on an uncompatible version of python-tomlkit

Ugh, why is this project so flaky with versions?

I don't see any upstream suggestion that they're considering bumping the version...

Instead of running `poetry <cmd>` you can run `python -m poetry <cmd>` to short-circuit the version check. Do you run into any actual issues with the new tomlkit version, other than the dependency constraint? If not, we can just patch out the version pinning...

(Note that I think it should be fine because the only real change was https://github.com/sdispater/tomlkit/co … da955e10a2.)

Last edited by eschwartz (2020-04-27 02:33:44)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2020-04-27 04:06:05

morgoth_bauglir
Member
Registered: 2014-06-26
Posts: 7

Re: python-poetry depends on an uncompatible version of python-tomlkit

eschwartz wrote:

Do you run into any actual issues with the new tomlkit version, other than the dependency constraint?

I only use tomlkit indirectly in the context of python-poetry, so can't comment on that.

eschwartz wrote:

(Note that I think it should be fine because the only real change was https://github.com/sdispater/tomlkit/co … da955e10a2.)

I agree!

Offline

#5 2020-04-27 12:22:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: python-poetry depends on an uncompatible version of python-tomlkit

morgoth_bauglir wrote:

I only use tomlkit indirectly in the context of python-poetry,

I'm pretty sure he was asking whether using python-poetry the way he suggested works suitably.  That invocation allows it to run without the version check, but does it result in incorrect results?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2020-04-27 23:57:20

morgoth_bauglir
Member
Registered: 2014-06-26
Posts: 7

Re: python-poetry depends on an uncompatible version of python-tomlkit

Trilby wrote:
morgoth_bauglir wrote:

I only use tomlkit indirectly in the context of python-poetry,

I'm pretty sure he was asking whether using python-poetry the way he suggested works suitably.  That invocation allows it to run without the version check, but does it result in incorrect results?

Yep, misunderstood that. Let me try again:

Trilby wrote:

Do you run into any actual issues with the new tomlkit version, other than the dependency constraint? If not, we can just patch out the version pinning...

I confirm: t works just fine running `python -m poetry <cmd>` instead of `poetry <cmd>.

Offline

#7 2020-04-28 02:15:25

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: python-poetry depends on an uncompatible version of python-tomlkit

https://bugs.archlinux.org/task/66431

Fix uploaded, get it with the following command (will succeed once your mirror has the package, usually within an hour or two):

pacman -Syu 'python-poetry>=1.0.5-2'

Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB