GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix repeated --extra-search-dir options by repzakske · Pull Request #3440 · pypa/virtualenv

Conversation

@repzakske

@repzakske repzakske commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

virtualenv env --extra-search-dir first --extra-search-dir second currently searches only second, despite the documented support for repeating the option. Offline creation can fail even when the required wheel is present in first; an online download can hide the ignored directory.

Accumulate CLI groups into a flat list while preserving the existing grouped syntax and CLI precedence over environment/INI defaults. Reuse the parser's default-initialization loop to reset accumulation between parses. Cover repeated/mixed groups, configuration precedence, and parser reuse, and correct the usage example.

Validation

  • Reproduced on main, 236f395 (21.14.10).
  • The original ten CLI cases produced 4 failures on the unchanged baseline; all now pass.
  • Real offline creation using unmodified bundled pip/setuptools wheels: repeated flags failed before the fix; repeated and grouped forms both succeed afterward and install the pinned versions.
  • All 12 focused cases pass on Python 3.9.25 and 3.15.0, including direct checks for repeated parsing, changed arguments, and restoration of unmodified defaults and their source.
  • Targeted configuration/seeder tests on Python 3.9: 91 passed, 2 skipped. Configuration/seeder/CLI tests on Python 3.15: 123 passed, 1 skipped (--skip-slow, COLUMNS=240, PLAT=win-amd64).
  • Repository-pinned pre-commit checks pass for all changed files. Source type checks pass for Python 3.9 and 3.15 with --python-platform all.
  • The full suite and upstream CI have not run.

The outside input is the list of caller-supplied search-directory paths. They continue to be parsed as Path values and used as wheel search locations; this change preserves directories that were previously dropped and does not change wheel verification.

Contribution checklist

  • ran the linter to address style issues (repository-pinned pre-commit hooks on the changed files)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder (0.bugfix.rst; rename to the allocated PR number after creation)
  • updated/extended the documentation
  • explained the outside input and how it is handled
  • ran targeted tests on Python 3.9 and 3.15 (direct pytest runs; full tox suites remain for CI)
  • no temporary interpreter overrides require upstream issue links
  • kept the PR in draft until CI passes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
repzakske added 3 commits October 17, 2026 21:28
@repzakske
Fix repeated --extra-search-dir options
b2117c7
Accumulate CLI wheel search directory groups while replacing configured defaults and avoiding duplicate values during staged parsing. Cover the repeated and grouped forms plus environment/ini precedence.

Signed-off-by: Casper Verbuyst <[email protected]>
@repzakske
Reuse parser default handling for repeated options
4619e9e
Signed-off-by: Casper Verbuyst <[email protected]>
@repzakske
Number changelog fragment for PR 3440
afa1a9c
Signed-off-by: Casper Verbuyst <[email protected]>
@gaborbernat
gaborbernat marked this pull request as ready for review October 17, 2026 23:03
@gaborbernat
gaborbernat enabled auto-merge (squash) October 17, 2026 23:03
@gaborbernat
gaborbernat disabled auto-merge October 18, 2026 06:24
@gaborbernat
gaborbernat merged commit 8a7de0a into pypa:main Oct 18, 2026
76 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@repzakske

repzakske commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and following up on my pr's so quickly!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@darrenhuai darrenhuai mentioned this pull request Oct 20, 2026
🐛 fix(config): stop CLI options accumulating across parse passes #3457
Merged
5 of 9 tasks
@darrenhuai darrenhuai mentioned this pull request Oct 30, 2026
🐛 fix(discovery): let -p replace the python set in config or env #3494
Merged
6 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@repzakske @gaborbernat
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.