From 4d27b2923382dff1a2082b5f8c9d975a0f02aab9 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 21 Jul 2026 10:53:49 +0100 Subject: [PATCH] fix: skip commitizen's stale py_3_13 invalid-command test 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). --- flake.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/flake.nix b/flake.nix index 87bc70d..263c2e7 100644 --- a/flake.nix +++ b/flake.nix @@ -95,6 +95,16 @@ claude-code ; }) + # commitizen 4.13.9's regression test for the invalid-command error + # message asserts argparse's older, unquoted "invalid choice" wording; + # the argparse in Python 3.13 quotes each choice, so the fixture no + # longer matches and the checkPhase fails. The package itself is fine + # -- deselect just that test. Drop once nixpkgs updates the fixture. + (_final: prev: { + commitizen = prev.commitizen.overridePythonAttrs (old: { + disabledTests = (old.disabledTests or [ ]) ++ [ "test_invalid_command" ]; + }); + }) ]; # Unfree packages permitted to be built (replaces blanket allowUnfree). -- 2.54.0