Skip to content

Add '--constraint' flag to 'venv install' to pass a contraints file to pip install - #43

Merged
connesy merged 2 commits into
auto-upgrade-pipfrom
add-constraint-flag
Oct 22, 2026
Merged

connesy merged 2 commits into
auto-upgrade-pipfrom
add-constraint-flag

Conversation

@connesy

@connesy connesy commented Oct 22, 2026

Copy link
Copy Markdown
Member

Stack created with GitHub Stacks CLI • Give Feedback 💬

@connesy
connesy added this pull request to stack #44 October 22, 2026 11:29
Copilot AI lite review requested due to automatic review settings October 22, 2026 11:29
@connesy connesy self-assigned this Oct 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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.
src/​venv-cli/​completions/​zsh/​venv_completion.sh Adds Zsh completion for constraint options and filenames.
src/​venv-cli/​completions/​bash/​venv_completion.sh Adds Bash completion for constraint options and filenames.
README.md Documents constraint-file usage and repeated options.
CHANGELOG.md Records the new option and argument-validation behavior.

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 22, 2026 12:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Three unresolved moderate completion issues affect Bash filename handling and supported Zsh completion behavior.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Prevent word splitting of spaced filenames in Bash completion

src/​venv-cli/​completions/​bash/​venv_completion.sh:59

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.

Review effort: Lite

@connesy
connesy merged commit edab173 into main Oct 22, 2026
12 checks passed
@connesy
connesy deleted the add-constraint-flag branch October 22, 2026 13:17
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

Successfully merging this pull request may close these issues.

3 participants