✨ feat(config): add {glob:PATTERN} substitution#3769
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Feb 19, 2026
Merged
✨ feat(config): add {glob:PATTERN} substitution#3769gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
a4e5f27 to
f5bdf76
Compare
Users frequently need to reference files by wildcard patterns in tox
configuration, e.g. uploading all wheel files from a dist directory.
Previously this required shell expansion or external scripts.
The new glob substitution supports both INI string syntax
({glob:dist/*.whl} with optional :DEFAULT) and TOML dict syntax
({ replace = "glob", pattern = "...", extend = true }). Relative
patterns resolve against tox_root, results are sorted for determinism,
and ** enables recursive matching.
Closes tox-dev#1571
f5bdf76 to
9581e80
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.
A common pain point for tox users is referencing files by wildcard patterns in configuration — uploading all wheels from a dist directory, pointing deps at requirement files matching a pattern, or collecting test artifacts. Until now this required shell expansion or external scripting, which breaks cross-platform compatibility and complicates configuration.
This adds a
{glob:PATTERN}substitution that expands file system glob patterns inline. It works in both INI string syntax ({glob:dist/*.whl}, with optional{glob:dist/*.whl:fallback}default) and TOML dict syntax ({ replace = "glob", pattern = "dist/*.whl", extend = true }). Relative patterns resolve againsttox_root, results are sorted for deterministic builds, and**enables recursive directory matching.The
extendflag in TOML dict syntax controls whether matched paths are inserted as separate list elements (useful incommands) or joined as a single space-separated string (useful indescriptionor other string fields). When no files match and no default is provided, the result is an empty string or empty list depending on context.Closes #1571