✨ feat(depends): add glob pattern support for depends option#3697
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Feb 15, 2026
Merged
✨ feat(depends): add glob pattern support for depends option#3697gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
ad58359 to
d5dd8f1
Compare
Users had to enumerate every dependency environment explicitly, which was error-prone when adding new environments to env_list. Glob patterns like `depends = py3*` now match against the set of environments being run, using fnmatch semantics. Self-matches are excluded to prevent cycles. Closes tox-dev#1152
d5dd8f1 to
b361a22
Compare
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.
Users had to enumerate every dependency environment explicitly in
depends, which was error-prone — adding a new Python version toenv_listwithout updatingdependscould cause race conditions in parallel runs. 🔧 This became especially painful for projects testing across many Python versions or platform factors.Glob patterns like
depends = py3*now match against all environments in the current run, usingfnmatchsemantics (*,?,[...]). Non-glob entries pass through unchanged, so existing configurations keep working. Self-matches are automatically excluded to prevent dependency cycles (e.g.depends = *won't create a self-dependency).Factor syntax (
{py39,py310}-test) continues to work as before since glob resolution happens after factor expansion at runtime inrun_order(), where the full set of environments is known.Closes #1152