diff --git a/pyproject.toml b/pyproject.toml index 2e4adb1d..d5514159 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,8 +37,7 @@ classifiers = [ ] dependencies = [ "awkward >=2.5.1", - "dask >=2024.12.0;python_version>'3.9'", - "dask >=2023.04.0;python_version<'3.10'", + "dask >=2023.04.0", "cachetools", "typing_extensions >=4.8.0", ] diff --git a/src/dask_awkward/layers/layers.py b/src/dask_awkward/layers/layers.py index b5c54523..f994227a 100644 --- a/src/dask_awkward/layers/layers.py +++ b/src/dask_awkward/layers/layers.py @@ -5,9 +5,6 @@ from typing import TYPE_CHECKING, Any, Literal, Protocol, TypeVar, Union, cast import dask - -_dask_uses_tasks = hasattr(dask, "_task_spec") - from dask.blockwise import Blockwise, BlockwiseDepDict, blockwise_token from dask.highlevelgraph import MaterializedLayer from dask.layers import DataFrameTreeReduction @@ -15,8 +12,10 @@ from dask_awkward.utils import LazyInputsDict +_dask_uses_tasks = hasattr(dask.blockwise, "Task") + if _dask_uses_tasks: - from dask._task_spec import Task, TaskRef + from dask.blockwise import Task, TaskRef # type: ignore if TYPE_CHECKING: from awkward import Array as AwkwardArray diff --git a/src/dask_awkward/lib/core.py b/src/dask_awkward/lib/core.py index a9567a56..6becf1b1 100644 --- a/src/dask_awkward/lib/core.py +++ b/src/dask_awkward/lib/core.py @@ -62,7 +62,7 @@ ) if _dask_uses_tasks: - from dask._task_spec import TaskRef + from dask.blockwise import TaskRef # type: ignore if TYPE_CHECKING: from awkward.contents.content import Content diff --git a/src/dask_awkward/lib/optimize.py b/src/dask_awkward/lib/optimize.py index 4b9dd6cf..6f5b4a4c 100644 --- a/src/dask_awkward/lib/optimize.py +++ b/src/dask_awkward/lib/optimize.py @@ -22,7 +22,7 @@ from dask_awkward.utils import first if _dask_uses_tasks: - from dask._task_spec import GraphNode, Task, TaskRef + from dask.blockwise import GraphNode, Task, TaskRef # type: ignore if TYPE_CHECKING: from awkward._nplikes.typetracer import TypeTracerReport