Skip to content

Poetry doesn't raise error if using wrong python version #5540

@anth2o

Description

@anth2o
  • 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: macOS 12.2.1

  • Poetry version: 1.1.13

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/anth2o/17c459b8d1e188b8f31791aca79e9b58

Issue

I have an issue when using Poetry. If I use a pyproject.toml similar to the one of the Gist, I want to constrain Python versio to be 3.10.*.
But if I'm trying to install this package using a lower version (for instance 3.9), I don't have any error displayed:

$ python -V
Python 3.9.12
$ poetry env info
poet
Virtualenv
Python:         3.9.12
Implementation: CPython
Path:           venv
Valid:          True

System
Platform: darwin
OS:       posix
Python:   /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9
r%
$ poetry install
Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

I think this is a serious issue since might want to force some Python version and this conflict is silently ignored. The issue is the same if I specify a lower version in the pyproject.toml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/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