馃悰 fix(deps): apply --force-dep to package metadata dependencies - #3734
Merged
gaborbernat merged 2 commits intoFeb 17, 2026
Conversation
gaborbernat
force-pushed
the
fix-force-dep-package-deps
branch
from
February 17, 2026 21:32
4b3705b to
1a92df3
Compare
Previously --force-dep only replaced dependencies listed in the tox config deps section, ignoring dependencies from package metadata (setup.cfg install_requires, pyproject.toml dependencies). Now force-dep overrides are applied to package deps during installation. Fixes tox-dev#2943
gaborbernat
force-pushed
the
fix-force-dep-package-deps
branch
from
February 17, 2026 21:33
4f7e59c to
6f7abab
Compare
for more information, see https://pre-commit.ci
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
--force-depflag only replaced dependencies listed in the tox configdepssection, but silently ignored dependencies coming from package metadata (setup.cfginstall_requires,pyproject.tomldependencies). This meant users could not force specific versions of transitive package dependencies, which is particularly problematic in monorepo setups where pre-release versions of internal packages need to be co-installed for testing.The fix applies force-dep overrides to package metadata dependencies during the pip installation phase, matching by package name and substituting the forced version. This covers all package types: wheels, sdists, editable, and legacy editable installs.
Fixes #2943