From 6c410c0960eb64eca7587ed9d1f8e6e15e220c5e Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Wed, 25 Feb 2026 12:25:23 +0100 Subject: [PATCH] python3Packages.tyro: 1.0.5 -> 1.0.8 Add universal-pathlib to nativeCheckInputs to satisfy upath tests. Disable three Python 3.13 tests that are build-environment specific: - test_bash_path_completion_marker: requires bash programmable completion builtin compgen, unavailable in the stdenv build shell. - test_similar_arguments_subcommands_multiple_contains_match - test_similar_arguments_subcommands_multiple_contains_match_cascading These two assert a literal class-b) substring that is split by line wrapping with long pytest argv[0] paths in Nix builds. Resolves #493873. --- .../python-modules/tyro/default.nix | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tyro/default.nix b/pkgs/development/python-modules/tyro/default.nix index 82c71552339d..c7e5298da2a8 100644 --- a/pkgs/development/python-modules/tyro/default.nix +++ b/pkgs/development/python-modules/tyro/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system hatchling, @@ -23,18 +24,19 @@ pydantic, pytestCheckHook, torch, + universal-pathlib, }: buildPythonPackage rec { pname = "tyro"; - version = "1.0.5"; + version = "1.0.8"; pyproject = true; src = fetchFromGitHub { owner = "brentyi"; repo = "tyro"; tag = "v${version}"; - hash = "sha256-/6z3XDN5WdVPVfA1LckpIAUis3dNOwg5hobR2sHlocA="; + hash = "sha256-GTgbzGIIZrkMUgjqMWZVXRVhp9mcxfnDQ/dRApotjww="; }; build-system = [ hatchling ]; @@ -57,6 +59,20 @@ buildPythonPackage rec { pydantic pytestCheckHook torch + universal-pathlib + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.13") [ + # Bash path completion relies on the programmable-completion builtin `compgen`, + # which is unavailable in the stdenv build shell. + "test_bash_path_completion_marker" + + # In Nix builds, the long `python -m pytest` argv[0] path gets line-wrapped in + # argparse error output, splitting `class-b` and `)` so this literal-match fails. + "test_similar_arguments_subcommands_multiple_contains_match" + + # Same wrapped-output literal-match issue as above for the cascading-args variant. + "test_similar_arguments_subcommands_multiple_contains_match_cascading" ]; pythonImportsCheck = [ "tyro" ];