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.47.1
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.47.2
Choose a head ref
  • 2 commits
  • 3 files changed
  • 4 contributors

Commits on Mar 3, 2026

  1. fix: handle OSError in pos_args path existence check (#3847)

    When positional arguments exceed the filesystem's filename length limit
    (typically 255 characters), `Path.exists()` raises `OSError: [Errno 36]
    File name too long` instead of returning `False`.
    
    This causes `tox` to crash with an internal error when **long** `-k`
    expressions are passed via `{posargs}`, e.g.:
    
        tox -e py3 -- -k "test_foo or test_bar or test_baz or ..."
    
    The traceback is:
    
        File ".../tox/config/main.py", line 58, in pos_args
            if path_arg.exists() and not path_arg.is_absolute():
    OSError: [Errno 36] File name too long: 'test_foo or test_bar or ...'
    
    This is because `pos_args()` checks each argument with
    `path_arg.exists()` to determine whether to rewrite relative paths for
    `changedir`. An argument that is too long for the filesystem clearly
    cannot be a path, so the fix catches `OSError` and treats such arguments
    as non-paths.
    
    <!-- Thank you for your contribution!
    
    Please, make sure you address all the checklists (for details on how see
    [development
    documentation](http://tox.readthedocs.org/en/latest/development.html#development))!
    -->
    
    - [ ] ran the linter to address style issues (`tox -e fix`) [XXX]
    - [x] wrote descriptive pull request text
    - [x] ensured there are test(s) validating the fix
    - [x] added news fragment in `docs/changelog` folder -- 
    - [ ] updated/extended the documentation
    
    <details><summary>[XXX]: tried but failed to install sphinx... might try
    again later</summary>
    
    ```
    [INFO] Using pre-commit with uv 0.10.7 via pre-commit-uv 4.2.1
    An unexpected error has occurred: CalledProcessError: command: ('/home/yoh/proj/misc/tox/.tox/fix/bin/uv', '--project', '/home/yoh/proj/misc/tox', 'pip', 'install', '.', 'sphinx>=9.1')
    return code: 1
    stdout: (none)
    stderr:
        Using Python 3.11.12 environment at: py_env-python3
          × No solution found when resolving dependencies:
          ╰─▶ Because the current Python version (3.11.12) does not satisfy
              Python>=3.12 and sphinx==9.1.0 depends on Python>=3.12, we can conclude
              that sphinx==9.1.0 cannot be used.
              And because only sphinx<=9.1.0 is available and you require sphinx>=9.1,
              we can conclude that your requirements are unsatisfiable.
    Check the log at /home/yoh/.cache/pre-commit/pre-commit.log
    fix: exit 3 (24.65 seconds) /home/yoh/proj/misc/tox> pre-commit run --all-files --show-diff-on-failure pid=4127791
      fix: FAIL code 3 (25.28=setup[0.62]+cmd[24.65] seconds)
      evaluation failed :( (25.34 seconds)
    
    ```
    </details>
    
    ---------
    
    Co-authored-by: Claude Sonnet 4.5 <[email protected]>
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    3 people authored Mar 3, 2026
    Configuration menu
    Copy the full SHA
    9aaec0c View commit details
    Browse the repository at this point in the history
  2. release 4.47.2

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