Skip to content

Support closed numeric ranges in tox env lists - #55

Open
mayankdhingra02 wants to merge 1 commit into
mgedmin:masterfrom
mayankdhingra02:codex/expand-tox-env-ranges
Open

mayankdhingra02 wants to merge 1 commit into
mgedmin:masterfrom
mayankdhingra02:codex/expand-tox-env-ranges

Conversation

@mayankdhingra02

Copy link
Copy Markdown

Tox reads env_list = py3{8-14} as seven environments. check-python-versions read it as Python 3.8 only, which caused a mismatch with equivalent project metadata. Running --add 3.15 also lost six existing environments.

The checker now expands closed numeric ranges inside brace groups in either direction. Updating a range uses the same version selection as comma-separated alternatives and retains grouped factors where the existing updater supports them.

I compared actual tox 4.25.0 and 4.67.13 output for ascending, descending, and mixed ranges. After the fix, --add 3.15 preserves all seven environments and adds py315. The full tox matrix passed on macOS with CPython 3.10–3.15 and PyPy 3.11, including 100% coverage and lint, type, and packaging checks.

Fixes #49.

Expand numeric alternatives within tox brace groups and use the same update logic as explicit alternatives. Preserve grouped factors when the Python version group includes ranges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support tox envlist range syntax

1 participant