-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
The bundle command doesn't respect the Python version constraint of the project. You can specify an interpreter with the --python option that isn't supported by the project.
Reproduction:
❯ poetry new .
❯ grep python pyproject.toml
python = "^3.12"
❯ /usr/bin/python3 -V
Python 3.9.6
❯ poetry bundle venv -p /usr/bin/python3 .venv
❯ .venv/bin/python -V
Python 3.9.6
❯ grep Requires-Python .venv/lib/python3.9/site-packages/repro-0.1.0.dist-info/METADATA
Requires-Python: >=3.12,<4.0Expected behavior:
The bundle command fails with an error similar to this:
The specified Python interpreter (3.9.19) is not supported by the project (^3.12).
Actual behavior:
The bundle command creates the environment with an interpreter that doesn't satisfy the Python constraint of the project.
Environment:
- poetry-plugin-bundle 1.3.0
- Poetry 1.8.3
- macOS
Metadata
Metadata
Assignees
Labels
No labels