From 6a3b74f6fd8d63b974cc929224633adf25aefbcf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 4 Jul 2026 21:43:25 +0200 Subject: [PATCH] python3Packages.zha: 1.4.1 -> 2.0.0 https://github.com/zigpy/zha/releases/tag/2.0.0 Moves tests into passthru.tests to escape infinite recursion with zha-quirks. --- .../python-modules/zha/default.nix | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/zha/default.nix b/pkgs/development/python-modules/zha/default.nix index 2b08a84c8f94..3e0278b6749f 100644 --- a/pkgs/development/python-modules/zha/default.nix +++ b/pkgs/development/python-modules/zha/default.nix @@ -1,30 +1,32 @@ { lib, + attrs, bellows, buildPythonPackage, fetchFromGitHub, freezegun, + frozendict, looptime, pyprojectVersionPatchHook, - pyserial, - pyserial-asyncio-fast, pytest-asyncio_0, pytest-timeout, pytest-xdist, pytestCheckHook, pythonOlder, setuptools, - zha-quirks, zigpy, zigpy-deconz, zigpy-xbee, zigpy-zigate, + zigpy-ziggurat, zigpy-znp, + zha, + zha-quirks, }: buildPythonPackage (finalAttrs: { pname = "zha"; - version = "1.4.1"; + version = "2.0.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -33,7 +35,7 @@ buildPythonPackage (finalAttrs: { owner = "zigpy"; repo = "zha"; tag = finalAttrs.version; - hash = "sha256-Jf8k/4z7eERiV2jwDzhV990sLBebasEKe5/0WbX1hYc="; + hash = "sha256-cLE30i+3dqmtasHZKgW16zThMwWbZ8wh/GFtrgWmpfE="; }; postPatch = '' @@ -50,14 +52,14 @@ buildPythonPackage (finalAttrs: { ]; dependencies = [ + attrs bellows - pyserial - pyserial-asyncio-fast - zha-quirks + frozendict zigpy zigpy-deconz zigpy-xbee zigpy-zigate + zigpy-ziggurat zigpy-znp ]; @@ -68,10 +70,13 @@ buildPythonPackage (finalAttrs: { pytest-timeout pytest-xdist pytestCheckHook + zha-quirks ]; pythonImportsCheck = [ "zha" ]; + doCheck = false; # infinite recursion with zhaquirks + disabledTests = [ # Tests are long-running and often keep hanging "test_check_available_no_basic_cluster_handler" @@ -100,6 +105,10 @@ buildPythonPackage (finalAttrs: { "test_gateway_startup_failure" # Failed first attempt, passed second, flaky ]; + passthru.tests = { + pytest = zha.overridePythonAttrs { doCheck = true; }; + }; + meta = { description = "Zigbee Home Automation"; homepage = "https://github.com/zigpy/zha";