Skip to content

πŸ› fix(pip): accept any --use-feature name in requirement options - #4436

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
Doomguy-BFG9000:fix/pip-use-feature-names
Nov 17, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
Doomguy-BFG9000:fix/pip-use-feature-names

Conversation

@Doomguy-BFG9000

Copy link
Copy Markdown
Contributor

--use-feature in deps or a requirements file was checked against a hard-coded list (2020-resolver, fast-deps). Names that pip accepts, such as inprocess-build-deps or truststore, failed during config evaluation before pip ran. The valid names depend on the pip version in the environment, and pip already rejects unknown ones, so tox now passes the name through unchanged.

Fixes #4435.

Verification on Windows:

  • The three new cases fail on main with invalid choice and pass with the change.

  • pytest tests/tox_env/python/pip passes on Python 3.11 (369 passed, 20 skipped). The two touched test files also pass on Python 3.12.

  • A project with --use-feature=truststore in requirements.txt now completes tox r -e py.

  • ruff check, ruff format --check, simplint, codespell and docstrfmt pass on the changed files at the pinned versions. The full tox -e fix and Python 3.15 were not run locally.

  • 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 fragment for user-facing changes, or applied skip news

  • updated/extended the documentation

  • ran tests on Python 3.11 and 3.15 (tox run -e 3.11,3.15)

  • linked upstream issues beside any temporary interpreter overrides

  • kept the PR in draft until CI passes

@Doomguy-BFG9000
Doomguy-BFG9000 marked this pull request as draft November 16, 2026 06:54
@Doomguy-BFG9000
Doomguy-BFG9000 marked this pull request as ready for review November 16, 2026 07:09
@gaborbernat gaborbernat added the bug A confirmed defect label Nov 17, 2026
@gaborbernat
gaborbernat merged commit 314799c into tox-dev:main Nov 17, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A confirmed defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--use-feature in deps or a requirements file rejects feature names that pip accepts

2 participants