python314Packages.dask: fix tests

Without this patch, a lot of them fail with error messages like

    _pickle.PicklingError: Can't pickle local object <function test_column_projection_map_partitions.<locals>.myfunc at 0x7fff7517b8a0

and one test fails with

    dask.multiprocessing.TypeError: cannot pickle 'itertools.chain' object
This commit is contained in:
Robert Schütz
2025-11-25 12:41:32 -08:00
parent 2a660c40d7
commit 49a9129591
@@ -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 = [