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

Specify Python Version Range in Pipfile #6144

Open
Semnodime opened this issue Apr 27, 2024 · 2 comments
Open

Specify Python Version Range in Pipfile #6144

Semnodime opened this issue Apr 27, 2024 · 2 comments

Comments

@Semnodime
Copy link

Issue description

[requires]
python_version = ">=3.12"

Expected result

Choose the latest python version available on the system to satisfy the constraints or raise the constraint error.

Actual result

Warning: Python >=3.12 was not found on your system...
Neither 'pyenv' nor 'asdf' could be found to install Python.

Steps to replicate

pipenv --python 3.12
# Change last line in Pipfile to `python_version = ">=3.12"`
pipenv --rm
pipenv --install
@matteius
Copy link
Member

Only absolute values are supported, and when upgrading python versions virtualenvs need to be recreated.

@Semnodime
Copy link
Author

Only absolute values are supported, and when upgrading python versions virtualenvs need to be recreated.

Correct. That's what I observed. This is a bug since the rest of the Pipfile uses the same version specifiers and pipenv --install does not communicate that only absolute values are supported and a range has been specified.
I acknowledge that one could conclude that from the pipenv error, but IMHO it'd be better to signal this parsing constraint explicitly along the error message.

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

2 participants