You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
OS version and name: Tested on macOS & Arch Linux
Poetry version: 1.1.2
Link of a Gist with the contents of your pyproject.toml file:
Issue
I converted my dependencies file using DepHell from Pipfile to requirements.txt to Poetry pyproject.toml. Trying to use this converted file, Poetry for some reason got stuck in an infinite loop. I tracked it down to one bad line.
The PyPI package has a name ruamel.yaml (with a dot), but my dependencies had it with a hyphen: ruamel-yaml
[tool.poetry.dependencies]
ruamel-yaml = "*"
Running poetry lock on such a file reproduces the infinite loop.
This may be partially causing #2094 ("Poetry is extremely slow when resolving the dependencies").
I cannot trigger this issue by using the Poetry command, however. If I write poetry add ruamel-yaml, it adds dependency with the correct name "ruamel.yaml" = "^0.16.12" and poetry lock works fine with that.
Note that if the dependency is added to pyproject.toml with a dot "ruamel.yaml" = "^0.16.12", it does not trigger the issue. It's somehow caused by the package name in pyproject.toml.
I have tested this out and there still seems to be an issue. I've installed the latest (prerelease) poetry and poetry-core from PyPI, but with the following pyproject.toml there's still and infinite loop:
[tool.poetry]
name = "demo"version = "1"description = "A Demo"authors = []
[tool.poetry.dependencies]
python = ">= 3.6""ruamel-yaml" = "*"
Activity
abn commentedon Oct 13, 2020
Looks like there is a cyclic dependency involved here.
intgr commentedon Oct 13, 2020
Note that if the dependency is added to pyproject.toml with a dot
"ruamel.yaml" = "^0.16.12", it does not trigger the issue. It's somehow caused by the package name in pyproject.toml.abn commentedon Oct 13, 2020
@intgr noticed that. Appreciate the details in your issue report, it is extremely helpful.
abn commentedon Oct 13, 2020
This seems to be the same as #3132.
utils: fix canonical package name regex
abn commentedon Oct 13, 2020
The issue was in how we normalised the name of the package. This needs a fix in core. And another change in poetry itself.
utils: fix canonical package name regex
domdfcoding commentedon Jul 4, 2021
Wondering whether there has been any progress on this?
intgr commentedon Jul 4, 2021
As I understand, commit python-poetry/poetry-core@b0d9086 was supposed to fix this?
domdfcoding commentedon Dec 2, 2021
I have tested this out and there still seems to be an issue. I've installed the latest (prerelease)
poetryandpoetry-corefrom PyPI, but with the followingpyproject.tomlthere's still and infinite loop:(I'm not a poetry user, so I might have gone wrong somewhere)
dimbleby commentedon May 31, 2022
This was fixed at python-poetry/poetry-core#328
github-actions commentedon Mar 1, 2024
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.