✨ feat(config): add package = "deps-only" mode#3774
Merged
gaborbernat merged 3 commits intotox-dev:mainfrom Feb 19, 2026
Merged
✨ feat(config): add package = "deps-only" mode#3774gaborbernat merged 3 commits intotox-dev:mainfrom
package = "deps-only" mode#3774gaborbernat merged 3 commits intotox-dev:mainfrom
Conversation
package = "deps-only" mode
75f4ff8 to
57f0eb9
Compare
auto-merge was automatically disabled
February 19, 2026 07:52
Pull request was converted to draft
Install package dependencies (including extras) without building or installing the package itself. For PEP-621 projects with static metadata, reads pyproject.toml directly without a packaging env. Falls back to the .pkg env for dynamic deps or non-PEP-621 projects. Fixes tox-dev#2301 Signed-off-by: Bernát Gábor <[email protected]>
57f0eb9 to
a8c73ed
Compare
The previous change to use the process returncode for FailedToStart errors caused platform-dependent behavior: Windows returns 1 while other platforms may differ. Restore the -5 sentinel since FailedToStart is a tox-internal error, not a backend-reported one. Also switch test_provision_install_pkg_pep517 from sdist to wheel to eliminate the devpi mirror dependency on setuptools, removing the flakiness entirely rather than masking it with retries.
test_get_env_reuses_config_across_package_flag creates real virtualenvs on Windows where virtualenv's symlink seed installation can hang indefinitely during process.communicate(). Add 60s timeout so it fails fast instead of blocking the entire CI run. Also bump --durations from 20 to 30 for better slow test visibility.
e3ef296 to
ba03f27
Compare
This was referenced Feb 19, 2026
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.
Many tox environments -- coverage combining, doc building, linting -- need a project's dependencies (and extras) but not the project itself. Today the only option is
skip_install = trueplus manually duplicating every dependency indeps, which drifts out of sync withpyproject.toml. This addspackage = "deps-only"so those environments can declareextras = ["docs"]and get the right dependencies automatically, just like a normal test environment, without paying for a build step. 🎯The implementation uses a two-tier resolution strategy. It first tries to read dependencies statically from a PEP 621
[project]table inpyproject.toml-- no packaging environment needed, same fast path asdependency_groups. If that fails (dynamic deps, no[project]table,setup.cfg-only projects), it falls back to the existing.pkgenv andprepare_metadata_for_build_wheelto extract metadata. A newload_deps_for_envabstract method onPythonPackageToxEnvexposes this fallback cleanly to the runner.The
extrasconfig key works identically to other package modes, including validation of unknown extra names. Existing configurations are unaffected --deps-onlyis purely opt-in alongside the existingwheel,sdist,sdist-wheel,editable,editable-legacy,skip, andexternalmodes.Fixes #2301