Skip to content

🐛 fix(run): print only the error for a missing option value - #3590

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
Pratik-Kumar-Dhakar:fix/missing-option-usage
Nov 20, 2026
Merged

gaborbernat merged 1 commit into
pypa:mainfrom
Pratik-Kumar-Dhakar:fix/missing-option-usage

Conversation

@Pratik-Kumar-Dhakar

@Pratik-Kumar-Dhakar Pratik-Kumar-Dhakar commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

When an option value is missing, virtualenv prints a usage line that advertises a deprecated option and omits the destination and most other options (#3585). The error will now show the missing value without that misleading usage line.

The early option parser handles only a subset of the command line. It will suppress its own usage text for these errors while keeping the specific argument error.

Thanks for contributing, make sure you address all the checklists (for details on how see development documentation)

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added a docs/changelog/+short-description.<type>.rst fragment for each user-facing change, or applied skip news
  • updated/extended the documentation
  • for changes to activation scripts, pyvenv.cfg, wheel downloads, app-data or release workflows: explained in the PR text which outside input the change handles (not applicable)
  • ran tests on Python 3.9 and 3.15 (the affected test modules, with pytest in 3.9 and 3.15 environments rather than through tox. On 3.9, one fixture-teardown error also happens on main in my environment)
  • linked upstream issues beside any temporary interpreter overrides
  • kept the PR in draft until CI passes (the main workflows are waiting for approval to run for a first-time contributor; pre-commit.ci and the docs build pass)

@Pratik-Kumar-Dhakar
Pratik-Kumar-Dhakar marked this pull request as ready for review November 19, 2026 16:58
The early option parser knows only part of the CLI, so its usage line
listed deprecated options and omitted the destination. Show the missing
value error without that misleading line.

Fixes pypa#3585
@gaborbernat
gaborbernat force-pushed the fix/missing-option-usage branch from 9bcfc9e to 1bc073d Compare November 20, 2026 01:12
@gaborbernat
gaborbernat merged commit e22b887 into pypa:main Nov 20, 2026
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants