hatch icon indicating copy to clipboard operation
hatch copied to clipboard

`hatch test -py 3.9` no longer works (in 1.16.0 and newer)

Open dhdaines opened this issue 1 month ago • 1 comments

Since hatch 1.16.0 it no longer works to call hatch test with python 3.9 (whether installed by hatch python install or not).

To reproduce:

hatch python install 3.9
hatch new test-test
cd test-test
hatch test         # will succeed
hatch test -py 3.9  # will do nothing
hatch test -py 3.9 --cover # will crash with IndexError

The exception for hatch test --cover -py 3.9:

│ /home/dhd/.local/pipx/venvs/hatch/lib/python3.11/site-packages/hatch/cli/test/__init__.py:199 in │
│ test                                                                                             │
│                                                                                                  │
│   196 │   │   │   context.env_vars["COVERAGE_PROCESS_START"] = coverage_config_file              │
│   197 │                                                                                          │
│   198 │   if cover:                                                                              │
│ ❱ 199 │   │   for context in app.runner_context([selected_envs[0]]):                             │
│   200 │   │   │   context.add_shell_command("cov-combine")                                       │
│   201 │   │                                                                                      │
│   202 │   │   if not cover_quiet:                                                                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range

dhdaines avatar Nov 27 '25 20:11 dhdaines

Hatch 1.16.0 we dropped support for 3.9 as it is officially end of life.

cjames23 avatar Nov 27 '25 22:11 cjames23