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

Bundle command doesn't respect Python constraint #104

Open
cjolowicz opened this issue Jun 16, 2024 · 0 comments
Open

Bundle command doesn't respect Python constraint #104

cjolowicz opened this issue Jun 16, 2024 · 0 comments

Comments

@cjolowicz
Copy link

cjolowicz commented Jun 16, 2024

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.0

Expected 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant