hatch
hatch copied to clipboard
Fix "hatch test -py 3.14 --cover" IndexError crash: Add 3.14 to internal default_config matrix in env/internal/test.py
Fixes IndexError crash in "hatch test -py 3.14 --cover"
Before this PR:
$ hatch test -py 3.14 --cover
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/hatch/cli/__init__.py:221 in │
│ main │
│ │
│ 218 │
│ 219 def main(): # no cov │
│ 220 │ try: │
│ ❱ 221 │ │ hatch(prog_name='hatch', windows_expand_args=False) │
│ 222 │ except Exception: # noqa: BLE001 │
│ 223 │ │ import sys │
│ 224 │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/click/core.py:1462 in __call__ │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/click/core.py:1383 in main │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/click/core.py:1850 in invoke │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/click/core.py:1246 in invoke │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/click/core.py:814 in invoke │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/site-packages/click/decorators.py:34 in │
│ new_func │
│ │
│ /home/jwatson/.pyenv/versions/3.14.0/lib/python3.14/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
Can you adjust tests/cli/env/test_show.py for test_default_as_json test as well for this change?
https://github.com/jwatson0/hatch/pull/1
Applied changes from commit 0636e7b
This needs another workflow run
Can you resolve conflicts and check what of your PR is still needed? A lot of this should be already merged in from other PRs