| « Back to Search | Reader Mode | Switch to Full Retro Site View | Links: Stay in Reader | Retro Mode: ON | Original » |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started . Copilot PR reviewer CopilotAI review requested due to automatic review settings July 28, 2026 04:15 Copilot PR reviewer Copilot AI reviewed Jul 28, 2026
Copilot
|
|
Alright, to me it seems good to go, and I will wait a week or so for feedback, assuming there are no major concerns after that and that everything can be forward fixed, with a new release following. A week could easily be more though as I will leave it to chance that I rediscover the issue (which is expected, at least if other GitPython work happens). |
464da19 to
2185732
|
Merging, also because I desperately want the |
fix Windows path handling for Python 3.13+ (#1955) #(2072)
da58f39
This commit also makes the test-suite independent of the presence of a local `master` branch. <!-- agent --> - make index and submodule path normalization distinguish drive-rooted, drive-relative, UNC, and device paths on Windows - confine normalized paths with `commonpath` instead of string-prefix checks - normalize `includeIf gitdir` patterns to Git-style separators - cover the other `isabs` consumers whose drive-rooted behavior correctly relies on Windows join semantics - remove the Windows 3.13-3.15 CI exclusions and add 3.13-3.15 to tox - make the pre-existing tests independent of a local `master` branch and linked-worktree-specific alternates For context, the classifiers mentioned in the issue #2072 were introduced by 904aa71 (`Declare support for Python 3.13-3.14`) and 7d5370d (`Add support for Python 3.15`), both included in 3.1.56. This PR supplies the Windows path work that those metadata changes did not include. - paths absolute on the current drive - drive-rooted paths such as `\directory` and `/directory` - drive-relative paths such as `C:directory` (rejected where repository confinement is required) - other-drive, UNC, and device paths - traversal and adjacent-prefix escape attempts - native and Git-style separators in conditional includes - config includes, submodule gitfiles, linked worktree metadata, clone destinations, and Cygwin-path conversion - Python 3.12.13, 3.13.14, 3.14.6, 3.14.6t, 3.15.0b4, and 3.15.0b4t installed locally with uv - full test set passed for every interpreter in an independent clone without a local `master` branch; daemon-free suites ran in parallel and `test_remote.py` ran serially because its static local daemon endpoint cannot be shared across processes - Ruff check and format - mypy - basedpyright - all pre-commit hooks Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
various fixes for windows paths
308d371
- Preserve POSIX backslashes in include patterns - Accept UNC share roots as rooted paths - treat includeIf patterns correctly on Windows, expecting forward slashes - Recognize UNC roots on older Python versions Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>Byron force-pushed the fix-windows-path-handling branch from
2185732 to
308d371
2d7f861
into
main
Aug 4, 2026
53 checks passed
Byron
deleted the
fix-windows-path-handling
branch
August 4, 2026 10:56
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 25, 2026
build(tox): write base_python fallbacks as comma-separated lists
30fd608
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run. Older tox skipped it: with tox 4.11.3
running on 3.13 and only 3.9 on `PATH`, it reported "skipped because
could not find python interpreter with spec(s):
py{39, 310, 311, 312, 38}". tox 4.56.0 changed the default of
`skip_missing_interpreters` to false, so current tox fails it
instead: with tox 4.67.1 and only 3.9 available, it reported "failed
with could not find python interpreter matching any of the specs
py{39, 310, 311, 312, 38}".
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196)
added 3.13, 3.14, and 3.15 to `env_list`. So on a system with only
3.13 or later, these environments could not run at all. With only
3.13, 3.14, and 3.15 available, a probe with
`py39, py310, py311, py312` was skipped with tox 4.23.2 and
virtualenv 20.28.1 and failed with tox 4.67.1 and virtualenv
21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13. (The brace form got 3.12 by matching `312`.)
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. On 3.14 and 3.15,
`html` reports 13 more Sphinx warnings than on 3.13, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 14 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the
first spec to the end of the list. That change,
pypa/virtualenv@bc7a91a5 (pypa/virtualenv#2821), was meant to let a
`--python` option take precedence over a single interpreter set in
the variable. So with tox 4.67.1 and virtualenv 21.14.13, the first
listed interpreter is tried last: a probe with `py39, py312, py311`
ran on 3.12, and one with `py312, py39` ran on 3.9. This is a problem
in how tox and virtualenv interact, not in this configuration. With
current versions, these environments are tried on 3.9 only if none of
3.10 through 3.15 is found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 25, 2026
build(tox): write base_python fallbacks as comma-separated lists
16d6e44
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run. Older tox skipped it: with tox 4.11.3
running on 3.13 and only 3.9 on `PATH`, it reported "skipped because
could not find python interpreter with spec(s):
py{39, 310, 311, 312, 38}". tox 4.56.0 changed the default of
`skip_missing_interpreters` to false, so current tox fails it
instead: with tox 4.67.1 and only 3.9 available, it reported "failed
with could not find python interpreter matching any of the specs
py{39, 310, 311, 312, 38}".
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196)
added 3.13, 3.14, and 3.15 to `env_list`. So on a system with only
3.13 or later, these environments could not run at all. With only
3.13, 3.14, and 3.15 available, a probe with
`py39, py310, py311, py312` was skipped with tox 4.23.2 and
virtualenv 20.28.1 and failed with tox 4.67.1 and virtualenv
21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13. (The brace form got 3.12 by matching `312`.)
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the
first spec to the end of the list. That change,
pypa/virtualenv@bc7a91a5 (pypa/virtualenv#2821), was meant to let a
`--python` option take precedence over a single interpreter set in
the variable. So with tox 4.67.1 and virtualenv 21.14.13, the first
listed interpreter is tried last: a probe with `py39, py312, py311`
ran on 3.12, and one with `py312, py39` ran on 3.9. This is a problem
in how tox and virtualenv interact, not in this configuration. With
current versions, these environments are tried on 3.9 only if none of
3.10 through 3.15 is found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 29, 2026
build(tox): write base_python fallbacks as comma-separated lists
789ec90
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run. Older tox skipped it: with tox 4.11.3
running on 3.13 and only 3.9 on `PATH`, it reported "skipped because
could not find python interpreter with spec(s):
py{39, 310, 311, 312, 38}". tox 4.56.0 changed the default of
`skip_missing_interpreters` to false, so current tox fails it
instead: with tox 4.67.1 and only 3.9 available, it reported "failed
with could not find python interpreter matching any of the specs
py{39, 310, 311, 312, 38}".
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196)
added 3.13, 3.14, and 3.15 to `env_list`. So on a system with only
3.13 or later, these environments could not run at all. With only
3.13, 3.14, and 3.15 available, a probe with
`py39, py310, py311, py312` was skipped with tox 4.23.2 and
virtualenv 20.28.1 and failed with tox 4.67.1 and virtualenv
21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13. (The brace form got 3.12 by matching `312`.)
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the
first spec to the end of the list. That change,
pypa/virtualenv@bc7a91a5 (pypa/virtualenv#2821), was meant to let a
`--python` option take precedence over a single interpreter set in
the variable. So with tox 4.67.1 and virtualenv 21.14.13, the first
listed interpreter is tried last: a probe with `py39, py312, py311`
ran on 3.12, and one with `py312, py39` ran on 3.9. This is a problem
in how tox and virtualenv interact, not in this configuration. With
current versions, these environments are tried on 3.9 only if none of
3.10 through 3.15 is found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 29, 2026
build(tox): write base_python fallbacks as comma-separated lists
64765a2
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run. Older tox skipped it: with tox 4.11.3
running on 3.13 and only 3.9 on `PATH`, it reported "skipped because
could not find python interpreter with spec(s):
py{39, 310, 311, 312, 38}". tox 4.56.0 changed the default of
`skip_missing_interpreters` to false, so current tox fails it
instead: with tox 4.67.1 and only 3.9 available, it reported "failed
with could not find python interpreter matching any of the specs
py{39, 310, 311, 312, 38}".
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13. (The brace form got 3.12 by matching `312`.)
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 29, 2026
build(tox): write base_python fallbacks as comma-separated lists
92421be
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 29, 2026
build(tox): write base_python fallbacks as comma-separated lists
2196215
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 29, 2026
build(tox): write base_python fallbacks as comma-separated lists
b25ce2e
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 29, 2026
build(tox): write base_python fallbacks as comma-separated lists
36fa96b
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This keeps the intended order, except that
3.8 is left out, and adds the newer versions at the end.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 30, 2026
build(tox): write base_python fallbacks as comma-separated lists
6aea82d
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This writes the intended order, except that
3.8 is left out, and adds the newer versions at the end. Current
virtualenv does not try them in that order, as described below.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 30, 2026
build(tox): write base_python fallbacks as comma-separated lists
4e43164
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This writes the intended order, except that
3.8 is left out, and adds the newer versions at the end. Current
virtualenv does not try them in that order, as described below.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 30, 2026
build(tox): write base_python fallbacks as comma-separated lists
a3354d2
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This writes the intended order, except that
3.8 is left out, and adds the newer versions at the end. Current
virtualenv does not try them in that order, as described below.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 31, 2026
build(tox): write base_python fallbacks as comma-separated lists
54a94e2
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This writes the intended order, except that
3.8 is left out, and adds the newer versions at the end. Current
virtualenv does not try them in that order, as described below.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it would now cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. Current virtualenv also tries the first
listed interpreter last, as described below, so 3.8 would be tried
before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only 3.8 and
3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
Current virtualenv does not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and since
virtualenv 20.29, when that variable is set, virtualenv moves the first
spec to the end of the list. That change, pypa/virtualenv@bc7a91a5
(pypa/virtualenv#2821), was meant to let a `--python` option take
precedence over a single interpreter set in the variable. So with tox
4.67.1 and virtualenv 21.14.13, the first listed interpreter is tried
last: a probe with `py39, py312, py311` ran on 3.12, and one with
`py312, py39` ran on 3.9. This is a problem in how tox and virtualenv
interact, not in this configuration. With current versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
EliahKagan
added a commit
to EliahKagan/GitPython
that referenced
this pull request
Oct 31, 2026
build(tox): write base_python fallbacks as comma-separated lists
32a83a0
The `ruff`, `format`, `mypy`, `html`, and `misc` environments are each
meant to run once, on the first available interpreter in a preference
order: Python 3.9 first, then 3.10, 3.11, 3.12, and 3.8. They wrote
that as `base_python = py{39,310,311,312,38}`, a form introduced in
62c024e (gitpython-developers#1693).
tox expands braces in generative environment lists and section names,
such as `env_list = py{38,...}` and `[testenv:py{38,39,310}]` in this
file, and in factor conditions, but not in the values of settings
like `base_python`. There, it just splits on commas, giving the five
specs `py{39`, `310`, `311`, `312`, and `38}`. The first and last are
not valid interpreter specs, so 3.9 and 3.8 were never candidates.
The bare `310`, `311`, and `312` are accepted as version specs, so the
environments still ran if 3.10, 3.11, or 3.12 was found. If none was,
the environment did not run: with tox 4.11.3 running on 3.13 and only
3.9 on `PATH`, it reported "skipped because could not find python
interpreter with spec(s): py{39, 310, 311, 312, 38}". Since tox 4.56.0
changed the default of `skip_missing_interpreters` to false, current
tox fails it instead.
Write each list as `py39, py310, py311, py312, py313, py314, py315`,
the documented form for several `base_python` values, of which the
first one found is used. This writes the intended order, except that
3.8 is left out, and adds the newer versions at the end. virtualenv
20.29 to 21.14 do not try them in that order, as described below.
62c024e listed as fallbacks all the Python versions the project
supported, but the lists were not extended when da58f39 (gitpython-developers#2196) added
3.13, 3.14, and 3.15 to `env_list`. So on a system with only 3.13 or
later, these environments could not run at all. With only 3.13, 3.14,
and 3.15 available, a probe with `py39, py310, py311, py312` was skipped
with tox 4.23.2 and virtualenv 20.28.1 and failed with tox 4.67.1 and
virtualenv 21.14.13, while the full list ran on 3.13 with both.
The brace form never selected 3.8, so leaving it out takes away
nothing that worked, and listing it could cause failures. Since
virtualenv 21.5.0, virtualenv cannot create Python 3.8 environments.
tox 4.56.0 and later work around that by bootstrapping an older
virtualenv, but only when the installed virtualenv can create none of
the `base_python` candidates, which is not the case for a list that
also names newer versions. virtualenv 20.29 to 21.14 also try the
first listed interpreter last, as described below, so 3.8 would be
tried before 3.9. With tox 4.67.1 and virtualenv 21.14.13 and only
3.8 and 3.9 available, a probe with `py39, py310, py311, py312, py38`
accepted 3.8 and then failed with "could not find python interpreter
matching any of the specs". With `py39, py310, py311, py312`, it ran
on 3.9.
Even where 3.8 environments can be created, `mypy` and `html` would
not work as intended on 3.8. The `test` extra installs mypy only on
3.9 and later, so the `mypy` environment would not have the `mypy`
command it runs, and `ignore_outcome` would turn that failure into a
warning. The `doc` group's Sphinx requirement also applies only on
3.9 and later, so `html` would build with whatever Sphinx version the
other documentation dependencies happened to pull in.
Checked with a minimal tox project whose only environment prints its
interpreter's version, with Python 3.9 and 3.12 on `PATH` and tox
itself running on 3.13.
| Tooling | Brace form | Comma form |
|----------------------------------|------------|------------|
| tox 4.11.3, virtualenv 20.24.5 | 3.12 | 3.9 |
| tox 4.23.2, virtualenv 20.28.1 | 3.12 | 3.9 |
`tox config` shows the intended entries for each environment.
With tox 4.23.2 and virtualenv 20.28.1, `tox -e ruff` and
`tox -e format` with this `tox.ini` ran on Python 3.9.6 and passed.
With tox 4.67.1, each of the five environments also ran and passed on
each of Python 3.13.17, 3.14.9, and 3.15.1, selected with
`-x testenv:<name>.base_python=py313` and so on. `html` reports no
Sphinx warnings on 3.13, but 13 on each of 3.14 and 3.15, all about
`__annotate_func__`, which Python 3.14 adds to the `__dict__` of
classes with annotations. The build used Sphinx 7.4.7, as the `doc`
group requires Sphinx below 8. CI's documentation build on 3.14
reports the same 13 warnings.
virtualenv 20.29 to 21.14 do not keep this order. tox passes the
`base_python` list to virtualenv in `VIRTUALENV_PYTHON`, and when that
variable is set, those versions move the first spec to the end of the
list. That change, pypa/virtualenv@bc7a91a5 (pypa/virtualenv#2821), was
meant to let a `--python` option take precedence over a single
interpreter set in the variable. So with tox 4.67.1 and virtualenv
21.14.13, the first listed interpreter was tried last: a probe with
`py39, py312, py311` ran on 3.12, and one with `py312, py39` ran on
3.9. virtualenv 21.15.2 tries the values in the order given again
(pypa/virtualenv#3494). With it and tox 4.67.1, a probe with
`py39, py313` ran on 3.9, where virtualenv 21.14.13 ran it on 3.13.
This was a problem in how tox and virtualenv interacted, not in this
configuration. With the affected virtualenv versions, these
environments are tried on 3.9 only if none of 3.10 through 3.15 is
found.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment