Surprising behaviour (and missing warning?) with overlaping python versions #5066
Closed
3 tasks done
Labels
area/solver
Related to the dependency resolver
kind/bug
Something isn't working as expected
status/confirmed
Issue is reproduced and confirmed
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: Linux, Fedora 35
Poetry version: $ poetry --version
Poetry version 1.1.12
Link of a Gist with the contents of your pyproject.toml file:
Issue
When experimenting with how poetry lock files handle different python versions, I tried
poetry install
ing from the followingpyproject.toml
.I hadn't noticed that the project was scoped to
python ^= 3.10
. Running this on Python 3.10, I expected the constraingpython ^3.9
to beatpython ^3.7
, and so expected poetry to selectpillow ^9
at install time. What I saw instead was that poetry reported installing two copies of pillow:The poetry 7.2.0 installation finished second (is this racey?). If I ask pillow what version is installed, it thinks 7.2:
If I ask
pip
, I get a different answer!!Confusingly,
poetry show --tree
includes both versions:While I don't think I'm using poetry as intended, it'd be nice to avoid falling into this unusual situation is possible. Perhaps the tool could require that the python versions specified for a particular package are pairwise exclusive; i.e. that at most one rule applies to any given python version.
The text was updated successfully, but these errors were encountered: