-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add support for PEP 440 version specifiers in the --python flag.
#3008
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
Merged
gaborbernat
merged 32 commits into
pypa:main
from
rahuldevikar:users/rahuldevikar/fix2994_clean
Jan 7, 2026
Merged
Add support for PEP 440 version specifiers in the --python flag.
#3008
gaborbernat
merged 32 commits into
pypa:main
from
rahuldevikar:users/rahuldevikar/fix2994_clean
Jan 7, 2026
+404
−6
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
Test succeeding(one timeout): https://github.com/rahuldevikar/virtualenv/actions/runs/20672977256 New run(increased timeout): https://github.com/rahuldevikar/virtualenv/actions/runs/20673442400 |
5 tasks
rahuldevikar
commented
Jan 3, 2026
rahuldevikar
commented
Jan 3, 2026
for more information, see https://pre-commit.ci
4437b46 to
4afaf6c
Compare
gaborbernat
requested changes
Jan 5, 2026
Contributor
gaborbernat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is also failing.
for more information, see https://pre-commit.ci
…/rahuldevikar/virtualenv into users/rahuldevikar/fix2994_clean
gaborbernat
approved these changes
Jan 7, 2026
Contributor
This was referenced Jan 7, 2026
This was referenced Jan 14, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add PEP 440 version specifier support for --python flag
Implements support for using PEP 440 version specifiers with the --python flag,
allowing users to specify Python versions using operators like >=, <=, ~=, etc.
Examples:
Changes:
Fixes #2994
Use any Python >= 3.12
virtualenv --python=">=3.12" myenv
Use CPython ~= 3.11.0 (compatible release)
virtualenv --python="cpython~=3.11.0" myenv
Use Python between 3.10 and 3.13
virtualenv --python=">=3.10,<=3.13" myenv
With implementation prefix
virtualenv --python="python>=3.11" myenv