Dependencies with python restrictions without an upper bound have been broken on poetry 2.1.0 #10185
Labels
area/core
Related to the poetry-core library
kind/bug
Something isn't working as expected
status/duplicate
Duplicate issues
Description
We have a pyproject.toml generated with poetry 1.x.x, which works with poetry 2.0.1, but does not work with poetry 2.1.0
I've tried tracking down the issue, and figured out that it is bound to the following dependency
However, it only causes the issue when there is a dependency going after it, if it is the sole dependency, it works.
Moreover, I was able to determine that it crashes only in the case, where the last dependency does not have an upper bound
If I change the python version to the capped one like
{ version = ">=2.1.0", python = ">=3.13,4" },
, it works.If I put a dependency with an upper bound as the last dependency in the list, it also works. E.g., the following works:
Workarounds
If one has a list of dependencies finishing with an uncapped python version, try either capping the version or sort the list of dependencies so the last dependency in the list has an upper bound.
Poetry Installation Method
pip
Operating System
Mac os
Poetry Version
Poetry (version 2.1.0)
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
The text was updated successfully, but these errors were encountered: