Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry entering an inifinitive loop #8074

Closed
4 tasks done
vesnikos opened this issue Jun 7, 2023 · 2 comments
Closed
4 tasks done

Poetry entering an inifinitive loop #8074

vesnikos opened this issue Jun 7, 2023 · 2 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@vesnikos
Copy link

vesnikos commented Jun 7, 2023

  • Poetry version: Poetry (version 1.5.1)
  • Python version: 3.10.6
  • OS version and name: ubuntu20.04 (wsl)
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

in one of my projects I use the moto packages in it's dev depencies but recently i discovered that the poetry update --dry-run was taking for ever. Upon running the above command with the -vvv flag the following was outputs were standing out as error (note the output was too long to post here, so bellow I post only the bit that I thought is relevent):

Source (PyPI): 0 packages found for botocore >1.29.70,<1.29.71
Falling back to installed packages to discover metadata for botocore
Found 0 compatible packages for botocore
  79: fact: no versions of botocore match >1.29.70,<1.29.71
  79: conflict: no versions of botocore match >1.29.70,<1.29.71
  79: ! botocore (>1.29.70,<1.29.71) is partially satisfied by not botocore (==1.29.70)
  79: ! which is caused by "botocore (1.29.70) depends on urllib3 (>=1.25.4,<1.27)"
  79: ! thus: botocore (>=1.29.70,<1.29.71) requires urllib3 (>=1.25.4,<1.27)
  79: fact: botocore (>=1.29.70,<1.29.71) requires urllib3 (>=1.25.4,<1.27)
  79: derived: not botocore (>=1.29.70,<1.29.71)
  79: derived: not boto3 (==1.26.70)
  79: fact: responses (0.23.1) depends on requests (>=2.22.0,<3.0)
  79: fact: responses (0.23.1) depends on urllib3 (>=1.25.10)
  79: fact: responses (0.23.1) depends on pyyaml (*)
  79: fact: responses (0.23.1) depends on types-PyYAML (*)
  80: selecting responses (0.23.1)
  80: fact: coverage (7.2.7) depends on coverage (7.2.7)
  80: fact: coverage (7.2.7) depends on tomli (*)
  80: selecting coverage[toml] (7.2.7)
  80: derived: coverage (==7.2.7)

Upon further investigating I found the problem was steaming from poetry was trying to resolve the 'moto' package so I tried to experiment on a clean project:

poetry new test-moto
poetry add moto -vvv
~~~ 
The result was that poetry was entering in an loop to download every single version of botocore (a depenency of moto?) in an futile attempt to solve something:

Source (PyPI): Getting info for botocore (1.29.148) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/botocore/1.29.148/json HTTP/1.1" 200 3069
1: fact: botocore (1.29.148) depends on jmespath (>=0.7.1,<2.0.0)
1: fact: botocore (1.29.148) depends on python-dateutil (>=2.1,<3.0.0)
1: fact: botocore (1.29.148) depends on urllib3 (>=1.25.4,<1.27)
1: derived: not botocore (==1.29.148)
Source (PyPI): Getting info for botocore (1.29.147) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/botocore/1.29.147/json HTTP/1.1" 200 3072
1: fact: botocore (1.29.147) depends on jmespath (>=0.7.1,<2.0.0)
1: fact: botocore (1.29.147) depends on python-dateutil (>=2.1,<3.0.0)
1: fact: botocore (1.29.147) depends on urllib3 (>=1.25.4,<1.27)
1: derived: not botocore (==1.29.147)
Source (PyPI): Getting info for botocore (1.29.146) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/botocore/1.29.146/json HTTP/1.1" 200 3072
1: fact: botocore (1.29.146) depends on jmespath (>=0.7.1,<2.0.0)
1: fact: botocore (1.29.146) depends on python-dateutil (>=2.1,<3.0.0)
1: fact: botocore (1.29.146) depends on urllib3 (>=1.25.4,<1.27)
1: derived: not botocore (==1.29.146)
Source (PyPI): Getting info for botocore (1.29.145) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/botocore/1.29.145/json HTTP/1.1" 200 3066
1: fact: botocore (1.29.145) depends on jmespath (>=0.7.1,<2.0.0)
1: fact: botocore (1.29.145) depends on python-dateutil (>=2.1,<3.0.0)
1: fact: botocore (1.29.145) depends on urllib3 (>=1.25.4,<1.27)
1: derived: not botocore (==1.29.145)
Source (PyPI): Getting info for botocore (1.29.144) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/botocore/1.29.144/json HTTP/1.1" 200 3067
1: fact: botocore (1.29.144) depends on jmespath (>=0.7.1,<2.0.0)
1: fact: botocore (1.29.144) depends on python-dateutil (>=2.1,<3.0.0)
1: fact: botocore (1.29.144) depends on urllib3 (>=1.25.4,<1.27)
1: derived: not botocore (==1.29.144)
Source (PyPI): Getting info for botocore (1.29.143) from PyPI

(same pattern as above)


The issue was resolved by first installing boto3  by running `poetry add boto3`  and then installing moto by running `poetry add moto`. 

I am not sure it is a poetry bug or a faulty dependency declaration from the beforemention packages, but the obsevered behaviour of poetry  was that it was entering in an infinitive loop 
@vesnikos vesnikos added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jun 7, 2023
@dimbleby
Copy link
Contributor

dimbleby commented Jun 7, 2023

duplicate #7858 etc please close

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants