Repository navigation
Commit 851f47c
build(tox): skip missing interpreters locally, but not in CI
The README says that running `tox` locally "skips any Python versions
you don't have installed". That was tox's default until tox 4.56.0
changed the default of `skip_missing_interpreters` to false. Since
then, an environment whose Python is not installed fails. `env_list`
names `py38` through `py315`, so a contributor who runs `tox` without
all eight versions gets a failed run.
Set `skip_missing_interpreters = true` in `[tool.tox]`, so local runs
skip those environments again, as the README describes. tox still
reports failure if every environment it was asked to run is skipped.
The `tox` workflow must not skip, since each job exists to test one
Python version. With current tox, it already failed on a missing
interpreter, but only because it installs the newest tox. Pass
`--skip-missing-interpreters=false` there, so a job fails if its
Python is missing, whatever the configuration or tox version says.
The option's value is optional, and a bare `--skip-missing-interpreters`
means `true`, so the `=` form makes clear that `false` is its value.
Checked with tox 4.67.1, with Python 3.9 installed and 3.10 not.
`tox -e py39,py310` ran `py39` and skipped `py310`, and passed. With
`--skip-missing-interpreters=false`, `py310` failed, and so did the
run, also with tox 4.22.0. In a minimal project with the same setting
and tox-gh active, a job whose mapped environment had no interpreter
failed with that option.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent df93768 commit 851f47c
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| |||
0 commit comments