Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🐞) poetry only ever validates the python version when adding a new env, not with any other commands #5230

Closed
3 tasks done
KotlinIsland opened this issue Feb 24, 2022 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Feb 24, 2022

  • 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: Windows 10
  • Poetry version: Poetry version 1.1.13
  • Link of a Gist with the contents of your pyproject.toml file:
[tool.poetry.dependencies]
python = "^3.11"

Issue

>poetry env list
untitled-HfdF1kCl-py3.10
untitled-HfdF1kCl-py3.11 (Activated)

>poetry env use python3.10
Using virtualenv: C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\untitled-HfdF1kCl-py3.10

>poetry env list   
untitled-HfdF1kCl-py3.10 (Activated)
untitled-HfdF1kCl-py3.11

>poetry install
Installing dependencies from lock file

>poetry check
All set!

>poetry env remove python3.10
Deleted virtualenv: C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\untitled-HfdF1kCl-py3.10

>poetry env use python3.10

  NoCompatiblePythonVersionFound

  The specified Python version (3.10.2) is not supported by the project (^3.11).
  Please choose a compatible version or loosen the python constraint specified in the pyproject.toml file.

  at ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\utils\env.py:708 in create_venv
       704│             # If an executable has been specified, we stop there
       705│             # and notify the user of the incompatibility.
       706│             # Otherwise, we try to find a compatible Python version.
       707│             if executable:
    →  708│                 raise NoCompatiblePythonVersionFound(
       709│                     self._poetry.package.python_versions, python_patch
       710│                 )
       711│
       712│             io.write_line(

I would expect all of these commands (except the remove) to show errors (or warnings, if only listing envs)

@KotlinIsland KotlinIsland added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 24, 2022
@finswimmer
Copy link
Member

Hey @KotlinIsland,

this is a duplicate of #3426.

fin swimmer

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants