- Poetry version: Introduced in poetry 1.4.0
- Python version: Python 3.7, 3.10, 3.11 are all involved
- OS version and name: MacOS and Debian
- pyproject.toml:
Running with -vvv did not produce additional output.
Issue
In my project, I have the python dependency python = "~=3.10". I happen to have python 3.11 available on my development laptop, so I use that there. As part of our build pipeline, the pyproject.toml and poetry.lock files are copied into a Debian docker image which has a default python of 3.7, and has 3.10 but not 3.11 available. Prior to Poetry 1.4.0 this worked fine - Poetry would note that 3.7 wasn't supported by the project and then discover and use 3.10 automatically:
#24 0.801 The currently activated Python version 3.7.4 is not supported by the project (~=3.10).
#24 0.801 Trying to find and use a compatible version.
#24 0.833 Using python3.10 (3.10.8)
On Poetry 1.4.0 and higher, that doesn't happen. Instead, I get an error because 3.11 isn't available:
#23 0.844 The currently activated Python version 3.7.4 is not supported by the project (~=3.10).
#23 0.844 Trying to find and use a compatible version.
#23 0.885
#23 0.885 [Errno 2] No such file or directory: 'python3.11': 'python3.11'
I believe this behavior was introduced by #7221 , although I haven't read through the associated MR in detail yet.
-vvvoption) and have included the output below.Running with
-vvvdid not produce additional output.Issue
In my project, I have the python dependency
python = "~=3.10". I happen to have python 3.11 available on my development laptop, so I use that there. As part of our build pipeline, the pyproject.toml and poetry.lock files are copied into a Debian docker image which has a default python of 3.7, and has 3.10 but not 3.11 available. Prior to Poetry 1.4.0 this worked fine - Poetry would note that 3.7 wasn't supported by the project and then discover and use 3.10 automatically:On Poetry 1.4.0 and higher, that doesn't happen. Instead, I get an error because 3.11 isn't available:
I believe this behavior was introduced by #7221 , although I haven't read through the associated MR in detail yet.