From f04e9f65632992e853461471e28c48364bd71997 Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Mon, 11 Nov 2024 01:33:54 -0800 Subject: [PATCH] Backport PR #1745: (chore): unbound dask (#1751) Co-authored-by: Ilan Gold --- docs/release-notes/1725.bugfix.md | 2 ++ pyproject.toml | 2 +- tests/conftest.py | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/1725.bugfix.md diff --git a/docs/release-notes/1725.bugfix.md b/docs/release-notes/1725.bugfix.md new file mode 100644 index 000000000..c9a6dca3d --- /dev/null +++ b/docs/release-notes/1725.bugfix.md @@ -0,0 +1,2 @@ + +Remove upper pin on `dask` and exclude versions broken with sparse indexing {user}`ilan-gold` diff --git a/pyproject.toml b/pyproject.toml index a3cb64cbe..3cc1b31a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,7 +107,7 @@ gpu = ["cupy"] cu12 = ["cupy-cuda12x"] cu11 = ["cupy-cuda11x"] # https://github.com/dask/dask/issues/11290 -dask = ["dask[array]>=2022.09.2,<2024.8.0"] +dask = ["dask[array]>=2022.09.2,!=2024.8.*,!=2024.9.*"] [tool.hatch.version] source = "vcs" diff --git a/tests/conftest.py b/tests/conftest.py index 13fabdb93..9054812f5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,9 +3,16 @@ from functools import partial from typing import TYPE_CHECKING +import dask import joblib import pytest -from dask.base import normalize_seq, normalize_token, tokenize +from dask.base import normalize_token, tokenize +from packaging.version import Version + +if Version(dask.__version__) < Version("2024.8.0"): + from dask.base import normalize_seq +else: + from dask.tokenize import normalize_seq from scipy import sparse import anndata as ad