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

Closed
Semnodime opened this issue Apr 27, 2024 · 4 comments · Fixed by #6282
Closed

Specify Python Version Range in Pipfile #6144

Semnodime opened this issue Apr 27, 2024 · 4 comments · Fixed by #6282
Labels
Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged.

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.

@matteius matteius added the Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. label May 15, 2024
@sanspareilsmyn
Copy link
Contributor

@Semnodime @matteius I'd love to handle this issue. I'll send a PR to fix this in near future.

@matteius
Copy link
Member

@sanspareilsmyn I think I have it solved in my open PR that fixes a number of issues -- if either of you or @Semnodime can check out this branch: #6282 and give it a whirl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants