From 3a1392cd338eeb7e5368f6d9dbe3f273b67c7c83 Mon Sep 17 00:00:00 2001 From: Harinn Date: Mon, 18 May 2026 19:53:39 +0700 Subject: [PATCH] python3Packages.powerapi: fix build with python 3.14 --- pkgs/development/python-modules/powerapi/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/powerapi/default.nix b/pkgs/development/python-modules/powerapi/default.nix index 5cf9d0aa5104..1edd266975ba 100644 --- a/pkgs/development/python-modules/powerapi/default.nix +++ b/pkgs/development/python-modules/powerapi/default.nix @@ -11,6 +11,8 @@ pytest-cov-stub, pytest-timeout, pytestCheckHook, + pythonAtLeast, + pythonOlder, pyzmq, setproctitle, setuptools, @@ -38,11 +40,14 @@ buildPythonPackage rec { ]; optional-dependencies = { - influxdb = [ influxdb-client ]; kubernetes = [ kubernetes ]; mongodb = [ pymongo ]; # opentsdb = [ opentsdb-py ]; prometheus = [ prometheus-client ]; + } + // lib.optionalAttrs (pythonOlder "3.14") { + # influxdb-client depends on reactivex, which is disabled on 3.14 + influxdb = [ influxdb-client ]; }; nativeCheckInputs = [ @@ -55,7 +60,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "powerapi" ]; - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # multiprocessing pickling fails: darwin sandbox + py3.14 weakref change + disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin || pythonAtLeast "3.14") [ "test_puller" "TestDispatcher" "TestK8sProcessor"