Skip to content

Mistyped package name causes infinite loop #3200

@intgr

Description

@intgr
  • I am on the latest Poetry version.
  • 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").

image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/solverRelated to the dependency resolverkind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions