python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.62k stars 2.27k forks source link

Resolving pdfminer-six depedency causes infinite loop #3132

Closed tomlaube closed 2 years ago

tomlaube commented 4 years ago

Issue

Minimal toml to replicate issue:

[tool.poetry]
name = "project"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]

[tool.poetry.dependencies]
python = "^3.7"
pdfminer-six = "^20200124"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Running poetry update -vvv results in infinite loop:

   1: fact: pdfminer.six (20200124) depends on pycryptodome (*)
   1: fact: pdfminer.six (20200124) depends on sortedcontainers (*)
   1: fact: pdfminer.six (20200124) depends on chardet (*)
   1: selecting pdfminer.six (20200124)
   1: fact: pdfminer.six (20200124) depends on pycryptodome (*)
   1: fact: pdfminer.six (20200124) depends on sortedcontainers (*)
   1: fact: pdfminer.six (20200124) depends on chardet (*)
   1: selecting pdfminer.six (20200124)
   1: fact: pdfminer.six (20200124) depends on pycryptodome (*)
   1: fact: pdfminer.six (20200124) depends on sortedcontainers (*)
   1: fact: pdfminer.six (20200124) depends on chardet (*)
   1: selecting pdfminer.six (20200124)

The issue is most likely cause be that inconsistent naming: package pdfminer.six is correctly selected, it just doesn't match the provided pdfminer-six constraint.

abn commented 4 years ago

@sdispater seems that self._solution.relaton(term) is returning a subset. I did see similar cases in other issues. I suspect this is just a missing condition?

Similar issue #3200. Seems to be acused due to some issue with the name normalisation process.

alexkyllo commented 3 years ago

I am experiencing a similar infinite loop in dependency solving for a different package: azure-kusto-data. On poetry 1.1.4, in a clean new poetry project, poetry add azure-kusto-data -vvv gets stuck in this loop, on both Win 10 and Ubuntu:

1: fact: azure-identity (1.5.0) depends on azure-core (>=1.0.0,<2.0.0)
   1: fact: azure-identity (1.5.0) depends on cryptography (>=2.1.4)
   1: fact: azure-identity (1.5.0) depends on msal (>=1.6.0,<2.0.0)
   1: fact: azure-identity (1.5.0) depends on msal-extensions (>=0.3.0,<0.4.0)
   1: fact: azure-identity (1.5.0) depends on six (>=1.6)
   1: selecting azure-identity (1.5.0)
   1: fact: azure-identity (1.5.0) depends on azure-core (>=1.0.0,<2.0.0)
   1: fact: azure-identity (1.5.0) depends on cryptography (>=2.1.4)
   1: fact: azure-identity (1.5.0) depends on msal (>=1.6.0,<2.0.0)
   1: fact: azure-identity (1.5.0) depends on msal-extensions (>=0.3.0,<0.4.0)
   1: fact: azure-identity (1.5.0) depends on six (>=1.6)
   1: selecting azure-identity (1.5.0)
MarlonWe commented 2 years ago

Worked for me:

"pdfminer.six" = "^20220319"
dimbleby commented 2 years ago

should be closed by https://github.com/python-poetry/poetry-core/pull/328

github-actions[bot] commented 8 months ago

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.