From 49a9129591cd7614c22254daf65d5b6285f03c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 22 Nov 2025 09:08:27 -0800 Subject: [PATCH] python314Packages.dask: fix tests Without this patch, a lot of them fail with error messages like _pickle.PicklingError: Can't pickle local object .myfunc at 0x7fff7517b8a0 and one test fails with dask.multiprocessing.TypeError: cannot pickle 'itertools.chain' object --- pkgs/development/python-modules/dask/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index af46945b5197..8de30f38a67c 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system setuptools, @@ -49,6 +50,12 @@ buildPythonPackage rec { hash = "sha256-cU4w4dqJQ3ew+fRyD7Lc4URNfW738kKqls6k6j65pIo="; }; + # https://github.com/dask/dask/issues/12043 + postPatch = lib.optionalString (pythonAtLeast "3.14") '' + substituteInPlace dask/dataframe/dask_expr/tests/_util.py \ + --replace-fail "except AttributeError:" "except (AttributeError, pickle.PicklingError):" + ''; + build-system = [ setuptools setuptools-scm @@ -112,6 +119,11 @@ buildPythonPackage rec { "network" ]; + # https://github.com/dask/dask/issues/12042 + disabledTests = lib.optionals (pythonAtLeast "3.14") [ + "test_multiple_repartition_partition_size" + ]; + __darwinAllowLocalNetworking = true; pythonImportsCheck = [