Repository navigation
Commit 646119a
build(tox): pass
Since 212573b (gitpython-developers#2274), GitPython requires Git 2.52 or newer for
library-managed operations, and the tests require it too. The README
says that Git must be "available in `PATH` or selected with
`GIT_PYTHON_GIT_EXECUTABLE`", which lets a developer whose default
`git` is older point GitPython at a newer one without changing
`PATH`.
tox did not support the second way. Its environments only receive the
variables tox passes by default plus those in `pass_env`, which listed
just `SSH_*`. So `GIT_PYTHON_GIT_EXECUTABLE` set in the shell was
silently dropped, and `tox` ran the tests against whatever `git` came
first in `PATH`, even when that was too old.
Add `GIT_PYTHON_GIT_EXECUTABLE` to `pass_env` in `[testenv]`. Every
environment inherits it, including `gix` and the `py38` through
`py310` environments that only install and import GitPython, none of
which override `pass_env`. `GIT_PYTHON_BACKEND` is still not passed
through, since `[testenv]` and `gix` each set it explicitly.
Checked locally with tox 4.67.1 by running an environment with its
command overridden to print the variable, with
`GIT_PYTHON_GIT_EXECUTABLE` set in the calling shell. Before this change
it printed `None`; after it, the value that was set. `tox config` shows
the variable in `pass_env` for `py311`, `gix`, and `mypy`.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>GIT_PYTHON_GIT_EXECUTABLE through to environments1 parent 42a570f commit 646119a
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
0 commit comments