poetry: Poetry blocks on "Pending..." during installation

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Often (in practice always) it happens that during poetry install some packages are blocked on Pending... for a long time. I guess it should be related to the requests to PyPI or something like.

In practice, the fastest way to install an environment is to run poetry install, wait for as long as there still packages installing, and when you’re left with only Pending... packages, kill it and rerun. I guess there should be a more proper way to obtain this without killing Poetry over and over…

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (7 by maintainers)

Most upvoted comments

For what it’s worth, I apparently had this or a similar issue in Ubuntu 22.04 and a poetry -vvv install revealed that it was an issue with my keyring. Getting Python to ignore the keyring with export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring (from this SO Q&A) solved my immediate installation issues.

For what it’s worth, I apparently had this or a similar issue in Ubuntu 22.04 and a poetry -vvv install revealed that it was an issue with my keyring. Getting Python to ignore the keyring with export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring (from this SO Q&A) solved my immediate installation issues.

This also solved it for me, but why is this happening exactly? Poetry should be installed in the local environment, correct?

I have this issue. It seems to occur after Poetry receives a 304 response from PyPI:

[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/cachetools/5.2.1/json HTTP/1.1" 304 0

Clearing Poetry’s cache presumably changes something about the request being sent and makes PyPI return 200, then the package installs correctly.

Closing this for now as the only instances reported are because of transient network conditions. Killing Poetry may result in a corrupt cache that gets things stuck further – however, fixes for this are in 1.3 already.