Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64429 closed defect (fixed)

poetry: dependency issues with 'keyring'

Reported by: danieljamesscott (Daniel Scott) Owned by: dgilman (David Gilman)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: poetry

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When running poetry, I receive the following error:

pkg_resources.DistributionNotFound: The 'keyring<22.0.0,>=21.2.0' distribution was not found and is required by poetry

This seems to be caused by the file /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/poetry-1.1.12-py3.9.egg-info/requires.txt which contains this restriction.

I currently have poetry 1.1.12 installed, which only appears to set a lower bound on keyring https://github.com/python-poetry/poetry/blob/master/pyproject.toml#L46 so I'm not sure where the upper limit is being set.

Should this limit be set? Is it possible to remove/increase the upper bound of the dependency?

Change History (5)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: set to dgilman
Status: newassigned
Summary: Python poetry dependency issues with 'keyring'poetry: dependency issues with 'keyring'

poetry changed its keyring dependency to >=21.2.0 in this commit. Although 1.1.12 was released in November 2021 and the above change was made in May 2021, it was not included in the 1.1.12 release because the change was made on the master branch while the 1.1.12 release was cut from the 1.1 branch. I asked them to backport this fix to the 1.1 branch. In the mean time, we could backport the fix in the Portfile.

comment:2 Changed 2 years ago by danieljamesscott (Daniel Scott)

Thanks for your help.

I modified the requires.txt locally and then bumped into another issue

The 'packaging<21.0,>=20.4' distribution was not found and is required by poetry

After modifying the packaging requirement to match an available version I was able to successfully run poetry.

comment:3 Changed 2 years ago by dgilman (David Gilman)

Ryan, thank you for the sleuthing on this issue. It is greatly appreciated. Daniel, your followup is also appreciated.

I've prepared a patch that relaxes the version requirements. However, I'm not currently using poetry very actively so I can't do a ton of testing. The PR is open on GitHub.

comment:4 Changed 2 years ago by dgilman (David Gilman)

Resolution: fixed
Status: assignedclosed

In 16268c595f7c7ee358b9d503028ccfbb898067f7/macports-ports (master):

poetry: relax dependency requirements

Closes: #64429

comment:5 Changed 2 years ago by danieljamesscott (Daniel Scott)

Excellent. Thanks. I've updated and it's working fine.

Note: See TracTickets for help on using tickets.