fix: skip commitizen's stale py_3_13 invalid-command test #78

Merged
lyrathorpe merged 1 commits from fix/commitizen-py313-invalid-command-test into main 2026-07-21 11:26:21 +01:00
Owner

What

Add an overlay that deselects commitizen's test_invalid_command regression test so the package builds against the Python 3.13.14 in nixos-26.05.

Why

commitizen 4.13.9 keeps per-Python-minor golden files for its CLI regression tests. The py_3_13 golden was captured against an early 3.13, whose argparse did not quote invalid choices. CPython later backported quoting into the 3.13.x line; nixos-26.05 now ships 3.13.14, so the committed golden no longer matches argparse output and checkPhase fails:

-cz: error: ... invalid choice: 'x' (choose from init, commit, ...)
+cz: error: ... invalid choice: 'x' (choose from 'init', 'commit', ...)

This failure blocks the whole home-manager closure (commitizen is a home.packages entry in home/git.nix). The package itself is unaffected — only its own stale test fixture is wrong.

Upgrading the interpreter is not a real fix: 3.14 also quotes and only passes because commitizen ships a matching py_3_14 golden. Getting there would mean either bumping the channel-wide python3 off its 3.13 pin or dragging a second full interpreter into the closure for one CLI tool. Deselecting one stale-golden test is the minimal correct change.

Verification

  • nixosConfigurations.emmathorpe-edaas.config.system.build.toplevel builds green
  • checks.x86_64-linux.{formatting,deadnix,statix} all pass

The overlay carries a comment to drop it once nixpkgs refreshes the fixture (or the upstream 3.13.x revert lands).

## What Add an overlay that deselects commitizen's `test_invalid_command` regression test so the package builds against the Python 3.13.14 in `nixos-26.05`. ## Why commitizen 4.13.9 keeps per-Python-minor golden files for its CLI regression tests. The `py_3_13` golden was captured against an early 3.13, whose argparse did **not** quote invalid choices. CPython later backported quoting into the 3.13.x line; `nixos-26.05` now ships 3.13.14, so the committed golden no longer matches argparse output and `checkPhase` fails: ``` -cz: error: ... invalid choice: 'x' (choose from init, commit, ...) +cz: error: ... invalid choice: 'x' (choose from 'init', 'commit', ...) ``` This failure blocks the whole home-manager closure (commitizen is a `home.packages` entry in `home/git.nix`). The package itself is unaffected — only its own stale test fixture is wrong. Upgrading the interpreter is not a real fix: 3.14 also quotes and only passes because commitizen ships a matching `py_3_14` golden. Getting there would mean either bumping the channel-wide `python3` off its 3.13 pin or dragging a second full interpreter into the closure for one CLI tool. Deselecting one stale-golden test is the minimal correct change. ## Verification - `nixosConfigurations.emmathorpe-edaas.config.system.build.toplevel` builds green - `checks.x86_64-linux.{formatting,deadnix,statix}` all pass The overlay carries a comment to drop it once nixpkgs refreshes the fixture (or the upstream 3.13.x revert lands).
lyrathorpe added 1 commit 2026-07-21 10:56:39 +01:00
fix: skip commitizen's stale py_3_13 invalid-command test
CI / flake (push) Skipped
CI / flake (pull_request) Successful in 4m4s
4d27b29233
commitizen 4.13.9 ships per-Python-minor golden files for its CLI
regression tests. The py_3_13 golden was captured against an early 3.13
whose argparse did not quote invalid choices. CPython later backported
quoting into the 3.13.x line, and nixos-26.05 now ships 3.13.14, so the
golden no longer matches argparse's output:

  -cz: error: ... invalid choice: 'x' (choose from init, commit, ...)
  +cz: error: ... invalid choice: 'x' (choose from 'init', 'commit', ...)

This fails commitizen's checkPhase and breaks the home-manager closure.
The package itself is unaffected. Deselect just that test via an overlay
until nixpkgs updates the fixture (or the 3.13.x revert lands upstream).
lyrathorpe merged commit 9759cb70cf into main 2026-07-21 11:26:21 +01:00
lyrathorpe deleted branch fix/commitizen-py313-invalid-command-test 2026-07-21 11:26:22 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lyrathorpe/nixfiles#78