Skip to content

✨ feat(config): add {glob:PATTERN} substitution#3769

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:feat-glob-substitution-1571
Feb 19, 2026
Merged

✨ feat(config): add {glob:PATTERN} substitution#3769
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:feat-glob-substitution-1571

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

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 against tox_root, results are sorted for deterministic builds, and ** enables recursive directory matching.

The extend flag in TOML dict syntax controls whether matched paths are inserted as separate list elements (useful in commands) or joined as a single space-separated string (useful in description or 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

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
@gaborbernat gaborbernat force-pushed the feat-glob-substitution-1571 branch from f5bdf76 to 9581e80 Compare February 19, 2026 01:55
@gaborbernat gaborbernat merged commit 8929382 into tox-dev:main Feb 19, 2026
28 checks passed
@gaborbernat gaborbernat deleted the feat-glob-substitution-1571 branch February 20, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support expanding globs/path wildcards in configuration

1 participant