Skip to content

Commit a408cb0

Browse files
committed
bump min version to dask>=2024.08.1
1 parent 390863a commit a408cb0

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

xarray/namedarray/daskmanager.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,11 @@ def shuffle(
257257
) -> DaskArray:
258258
import dask.array
259259

260-
if not module_available("dask", minversion="2024.08.0"):
260+
if not module_available("dask", minversion="2024.08.1"):
261261
raise ValueError(
262-
"This method is very inefficient on dask<2024.08.0. Please upgrade."
262+
"This method is very inefficient on dask<2024.08.1. Please upgrade."
263263
)
264-
if chunks is not None:
265-
raise NotImplementedError
266-
return dask.array.shuffle(x, indexer, axis)
264+
chunks = chunks or "auto"
265+
if chunks != "auto":
266+
raise NotImplementedError("Only chunks='auto' is supported at present.")
267+
return dask.array.shuffle(x, indexer, axis, chunks=chunks)

xarray/tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _importorskip(
106106
has_h5netcdf, requires_h5netcdf = _importorskip("h5netcdf")
107107
has_cftime, requires_cftime = _importorskip("cftime")
108108
has_dask, requires_dask = _importorskip("dask")
109-
has_dask_ge_2024_08_0, _ = _importorskip("dask", minversion="2024.08.0")
109+
has_dask_ge_2024_08_1, _ = _importorskip("dask", minversion="2024.08.1")
110110
with warnings.catch_warnings():
111111
warnings.filterwarnings(
112112
"ignore",

xarray/tests/test_groupby.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
create_test_data,
2424
has_cftime,
2525
has_dask,
26-
has_dask_ge_2024_08_0,
26+
has_dask_ge_2024_08_1,
2727
has_flox,
2828
raise_if_dask_computes,
2929
requires_cftime,
@@ -600,7 +600,7 @@ def test_groupby_repr_datetime(obj) -> None:
600600
],
601601
)
602602
def test_groupby_drops_nans(shuffle: bool, chunk: Literal[False] | dict) -> None:
603-
if shuffle and chunk and not has_dask_ge_2024_08_0:
603+
if shuffle and chunk and not has_dask_ge_2024_08_1:
604604
pytest.skip()
605605
# GH2383
606606
# nan in 2D data variable (requires stacking)
@@ -1330,7 +1330,7 @@ def test_groupby_sum(self) -> None:
13301330
def test_groupby_reductions(
13311331
self, use_flox: bool, method: str, shuffle: bool, chunk: bool
13321332
) -> None:
1333-
if shuffle and chunk and not has_dask_ge_2024_08_0:
1333+
if shuffle and chunk and not has_dask_ge_2024_08_1:
13341334
pytest.skip()
13351335

13361336
array = self.da

0 commit comments

Comments
 (0)