Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tox-dev/tox
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.50.0
Choose a base ref
...
head repository: tox-dev/tox
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.50.1
Choose a head ref
  • 2 commits
  • 4 files changed
  • 3 contributors

Commits on Mar 19, 2026

  1. 🐛 fix(env): suggest normalized env name for dotted Python versions (#…

    …3888)
    
    Users typing `tox -e py3.10-lint` when their envlist defined
    `py310-lint` saw the command silently fall back to the base `[testenv]`
    configuration, running the wrong environment without warning or error.
    This became increasingly problematic with Python 3.10+ where dotted
    version notation (py3.10, py3.11) is common, creating easy-to-miss typos
    that produce confusing results.
    
    Python version factors can be written with or without dots: `py3.10` vs
    `py310`, `3.10` vs `310`. The validation logic treated dotted versions
    as valid dynamic factors even when a normalized equivalent existed in
    the config. 🔍 Since `py3.10` matched the Python version regex and `lint`
    was a valid factor, `py3.10-lint` passed validation and created an
    ad-hoc environment using `[testenv]` instead of the intended
    `[testenv:py310-lint]`.
    
    The fix normalizes environment names by removing dots from Python
    version factors, then checks if the normalized name exists in known
    environments. When found, tox errors with `py3.10-lint - did you mean
    py310-lint?` instead of silently proceeding. ✨ If the normalized name
    doesn't exist (e.g., `py3.15` when only `py310` and `py311` are
    defined), the dotted version is allowed as an ad-hoc environment,
    preserving the flexibility of tox's dynamic environment creation.
    
    This catches typos while maintaining backward compatibility for
    intentional ad-hoc environments.
    
    Fixes #3877
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    gaborbernat and pre-commit-ci[bot] authored Mar 19, 2026
    Configuration menu
    Copy the full SHA
    a438b58 View commit details
    Browse the repository at this point in the history
  2. release 4.50.1

    gaborbernat committed Mar 19, 2026
    Configuration menu
    Copy the full SHA
    dcd9552 View commit details
    Browse the repository at this point in the history
Loading