You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add '--constraint' flag to 'venv install' to pass a contraints file to pip install - #43
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
No unresolved review issues were identified, and all approval-readiness assessments support approval.
No open issues 🎉
What changed in this PR
Adds repeatable -c/--constraint support to venv install, forwarding constraint files to pip install with validation, completions, documentation, and tests.
Changes:
Parses and forwards one or more constraint files.
Validates missing constraint arguments before modifying the environment.
Updates Bash/Zsh completions, tests, README guidance, and the changelog.
File
Description
tests/test_venv_install.py
Tests constraint forwarding, repetition, quoting, validation, failures, and help output.
src/venv-cli/venv.sh
Parses constraint options and forwards them to pip.
This command substitution is subject to word splitting when the completion result contains spaces, so a valid file such as constraints with spaces.txt is returned as three separate completion entries (constraints, with, and spaces.txt) instead of one path. Read the compgen output into COMPREPLY without unquoted command-substitution splitting (for example, with a line-oriented array read) so the new completion supports the same spaced filenames that venv install -c accepts.
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
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬