From 01e75181ee904282e656ee01180c2d1d3e679239 Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Thu, 24 Oct 2024 17:48:00 -0400 Subject: [PATCH 01/11] new blank whatsnew --- doc/whats-new.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 9a451a836ad..18fae4e0151 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -14,6 +14,34 @@ What's New np.random.seed(123456) +.. _whats-new.2024.10.1: + +v.2024.10.1 (unreleased) +------------------------ + +New Features +~~~~~~~~~~~~ + + +Breaking changes +~~~~~~~~~~~~~~~~ + + +Deprecations +~~~~~~~~~~~~ + + +Bug fixes +~~~~~~~~~ + + +Documentation +~~~~~~~~~~~~~ + + +Internal Changes +~~~~~~~~~~~~~~~~ + .. _whats-new.2024.10.0: v2024.10.0 (Oct 24th, 2024) From cca664ba3cf8d22435d33d20b1011fef57b3bba6 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Wed, 19 Mar 2025 16:33:48 -0400 Subject: [PATCH 02/11] sketch deprecation warning --- xarray/backends/api.py | 4 +++- xarray/backends/zarr.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/xarray/backends/api.py b/xarray/backends/api.py index 7a23bceb27a..3b2f1cbd0fb 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -2187,7 +2187,9 @@ def to_zarr( See `Dataset.to_zarr` for full API docs. """ - from xarray.backends.zarr import _choose_default_mode, _get_mappers + from xarray.backends.zarr import _choose_default_mode, _get_mappers, _warn_of_consolidated_metadata_deprecation + + _warn_of_consolidated_metadata_deprecation(kwarg_name="consolidated", value=consolidated) # validate Dataset keys, DataArray names _validate_dataset_names(dataset) diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index d381897a29d..e99242b434a 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -4,6 +4,7 @@ import json import os import struct +import warnings from collections.abc import Hashable, Iterable, Mapping from typing import TYPE_CHECKING, Any, Literal, cast @@ -44,6 +45,19 @@ from xarray.core.types import ReadBuffer, ZarrArray, ZarrGroup +def _warn_of_consolidated_metadata_deprecation(kwarg_name: str, value: True | False | None) -> None: + # in some places this kwarg is called "consolidate" and in other places its called "consolidated" + if value is None: + warnings.warn( + f"The default value of the ``{kwarg_name}`` argument to zarr IO functions will soon change." + "The default value of ``None`` used to mean ``True``, but it will be changed to mean ``False``." + f"To preserve the same behaviour in future please pass ``{kwarg_name}=True`` explicitly." + "If you are not reading and writing from high-latency stores (e.g. Zarr v2/v3 format cloud object stores) you can safely ignore this warning." + "See https://github.com/pydata/xarray/issues/10122 for more information.", + PendingDeprecationWarning, + ) + + def _get_mappers(*, storage_options, store, chunk_store): # expand str and path-like arguments store = _normalize_path(store) @@ -1488,6 +1502,8 @@ def open_zarr( "open_zarr() got unexpected keyword arguments " + ",".join(kwargs.keys()) ) + _warn_of_consolidated_metadata_deprecation(kwarg_name="consolidated", value=consolidated) + backend_kwargs = { "synchronizer": synchronizer, "consolidated": consolidated, @@ -1766,6 +1782,8 @@ def _get_open_params( else: missing_exc = zarr.errors.GroupNotFoundError + warn_of_consolidated_metadata_deprecation(consolidate=consolidated) + if consolidated is None: try: zarr_group = zarr.open_consolidated(store, **open_kwargs) From e93a7ea4e21b0b512ac9ab6caea445374d23d7b0 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 13:19:25 -0400 Subject: [PATCH 03/11] test with working fixture --- xarray/backends/api.py | 10 +++++-- xarray/backends/zarr.py | 13 +++++---- xarray/tests/test_backends.py | 52 +++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/xarray/backends/api.py b/xarray/backends/api.py index 3b2f1cbd0fb..61adbecee37 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -2187,9 +2187,15 @@ def to_zarr( See `Dataset.to_zarr` for full API docs. """ - from xarray.backends.zarr import _choose_default_mode, _get_mappers, _warn_of_consolidated_metadata_deprecation + from xarray.backends.zarr import ( + _choose_default_mode, + _get_mappers, + _warn_of_consolidated_metadata_deprecation, + ) - _warn_of_consolidated_metadata_deprecation(kwarg_name="consolidated", value=consolidated) + _warn_of_consolidated_metadata_deprecation( + kwarg_name="consolidated", value=consolidated + ) # validate Dataset keys, DataArray names _validate_dataset_names(dataset) diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index e38df7849da..f83354cc976 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -4,7 +4,6 @@ import json import os import struct -import warnings from collections.abc import Hashable, Iterable, Mapping from typing import TYPE_CHECKING, Any, Literal, cast @@ -45,10 +44,12 @@ from xarray.core.types import ReadBuffer, ZarrArray, ZarrGroup -def _warn_of_consolidated_metadata_deprecation(kwarg_name: str, value: True | False | None) -> None: +def _warn_of_consolidated_metadata_deprecation( + kwarg_name: str, value: True | False | None +) -> None: # in some places this kwarg is called "consolidate" and in other places its called "consolidated" if value is None: - warnings.warn( + emit_user_level_warning( f"The default value of the ``{kwarg_name}`` argument to zarr IO functions will soon change." "The default value of ``None`` used to mean ``True``, but it will be changed to mean ``False``." f"To preserve the same behaviour in future please pass ``{kwarg_name}=True`` explicitly." @@ -1512,7 +1513,9 @@ def open_zarr( "open_zarr() got unexpected keyword arguments " + ",".join(kwargs.keys()) ) - _warn_of_consolidated_metadata_deprecation(kwarg_name="consolidated", value=consolidated) + _warn_of_consolidated_metadata_deprecation( + kwarg_name="consolidated", value=consolidated + ) backend_kwargs = { "synchronizer": synchronizer, @@ -1790,7 +1793,7 @@ def _get_open_params( else: missing_exc = zarr.errors.GroupNotFoundError - _warn_of_consolidated_metadata_deprecation(consolidate=consolidated) + _warn_of_consolidated_metadata_deprecation("consolidate", value=consolidated) if consolidated in [None, True]: # open the root of the store, in case there is metadata consolidated there diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index b2841e0da48..44b5dba8266 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -3594,6 +3594,58 @@ def create_zarr_target(self): yield {} +@requires_zarr +class TestDeprecateConsolidatedMetadataOnByDefault: + @pytest.fixture(autouse=True) + def create_empty_memorystore(self): + store = zarr.storage.MemoryStore({}, read_only=False) + # TODO I get an error if I don't create an empty root group, is that correct? + zarr.create_group(store=store) + self.store = store + + def test_warn_on_open(self) -> None: + # TODO: refactor to parametrize over these + from xarray import ( + open_dataarray, + open_dataset, + open_datatree, + open_groups, + open_zarr, + ) + + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidated`` argument", + ): + open_zarr(self.store) + + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidated`` argument", + ): + open_dataset(self.store, engine="zarr") + + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidated`` argument", + ): + open_dataarray(self.store, engine="zarr") + + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidated`` argument", + ): + open_groups(self.store, engine="zarr") + + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidated`` argument", + ): + open_datatree(self.store, engine="zarr") + + def test_warn_on_to_zarr(self, store) -> None: ... + + @requires_zarr @pytest.mark.skipif( ON_WINDOWS, From e34a573866e0566c46a4d5b8c1433b9f3a907d7e Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 13:20:01 -0400 Subject: [PATCH 04/11] add link to GH issue --- xarray/backends/zarr.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index f83354cc976..7086dba1968 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -47,6 +47,7 @@ def _warn_of_consolidated_metadata_deprecation( kwarg_name: str, value: True | False | None ) -> None: + # see issue https://github.com/pydata/xarray/issues/10122 # in some places this kwarg is called "consolidate" and in other places its called "consolidated" if value is None: emit_user_level_warning( From fadb9cf4de9a0e2988534d79ca04504c8f09c9f5 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 13:28:25 -0400 Subject: [PATCH 05/11] parametrize open_func --- xarray/tests/test_backends.py | 44 +++++++++++------------------------ 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 44b5dba8266..62440d294f6 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -36,7 +36,10 @@ load_dataset, open_dataarray, open_dataset, + open_datatree, + open_groups, open_mfdataset, + open_zarr, save_mfdataset, ) from xarray.backends.common import robust_getitem @@ -3603,47 +3606,26 @@ def create_empty_memorystore(self): zarr.create_group(store=store) self.store = store - def test_warn_on_open(self) -> None: - # TODO: refactor to parametrize over these - from xarray import ( + @pytest.mark.parametrize( + "open_func", + [ open_dataarray, open_dataset, open_datatree, open_groups, open_zarr, - ) - - with pytest.warns( - PendingDeprecationWarning, - match="default value of the ``consolidated`` argument", - ): - open_zarr(self.store) - - with pytest.warns( - PendingDeprecationWarning, - match="default value of the ``consolidated`` argument", - ): - open_dataset(self.store, engine="zarr") - - with pytest.warns( - PendingDeprecationWarning, - match="default value of the ``consolidated`` argument", - ): - open_dataarray(self.store, engine="zarr") - - with pytest.warns( - PendingDeprecationWarning, - match="default value of the ``consolidated`` argument", - ): - open_groups(self.store, engine="zarr") - + load_dataarray, + load_dataset, + ], + ) + def test_warn_on_open(self, open_func) -> None: with pytest.warns( PendingDeprecationWarning, match="default value of the ``consolidated`` argument", ): - open_datatree(self.store, engine="zarr") + open_func(self.store, engine='zarr') - def test_warn_on_to_zarr(self, store) -> None: ... + def test_warn_on_to_zarr(self) -> None: ... @requires_zarr From e4229fe730c8ce29b236b3cb1207556eac03f5a4 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 13:47:02 -0400 Subject: [PATCH 06/11] open tests passing --- xarray/tests/test_backends.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 62440d294f6..80ff961adbe 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -3604,26 +3604,39 @@ def create_empty_memorystore(self): store = zarr.storage.MemoryStore({}, read_only=False) # TODO I get an error if I don't create an empty root group, is that correct? zarr.create_group(store=store) + # needed for open_dataarray to work + zarr.create_array( + store=store, + name="foo", + shape=(2,), + chunks=(2,), + dtype="int32", + dimension_names=["x"], + ) self.store = store + # TODO do these actually have different kwarg names? @pytest.mark.parametrize( - "open_func", + "open_func, kwarg_name", [ - open_dataarray, - open_dataset, - open_datatree, - open_groups, - open_zarr, - load_dataarray, - load_dataset, + (open_dataset, "consolidate"), + (open_dataarray, "consolidate"), + (open_datatree, "consolidate"), + (open_groups, "consolidate"), + (open_zarr, "consolidate"), + (load_dataarray, "consolidate"), + (load_dataset, "consolidate"), ], ) - def test_warn_on_open(self, open_func) -> None: + def test_warn_on_open(self, open_func, kwarg_name) -> None: with pytest.warns( PendingDeprecationWarning, - match="default value of the ``consolidated`` argument", + match=f"default value of the ``{kwarg_name}`` argument", ): - open_func(self.store, engine='zarr') + if open_func is open_zarr: + open_zarr(self.store) + else: + open_func(self.store, engine="zarr") def test_warn_on_to_zarr(self) -> None: ... From c699fdd881426c10cecb8d4bdf1a38edb7546e2b Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 15:20:40 -0400 Subject: [PATCH 07/11] tests fully working --- xarray/tests/test_backends.py | 47 +++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 80ff961adbe..34ef6a06275 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -3597,12 +3597,13 @@ def create_zarr_target(self): yield {} +# TODO should we test that it doesn't warn if you explicitly pass a value for consolidate? @requires_zarr class TestDeprecateConsolidatedMetadataOnByDefault: @pytest.fixture(autouse=True) def create_empty_memorystore(self): store = zarr.storage.MemoryStore({}, read_only=False) - # TODO I get an error if I don't create an empty root group, is that correct? + # TODO I get a weird error if I don't create an empty root group, is that correct? zarr.create_group(store=store) # needed for open_dataarray to work zarr.create_array( @@ -3615,31 +3616,51 @@ def create_empty_memorystore(self): ) self.store = store - # TODO do these actually have different kwarg names? @pytest.mark.parametrize( - "open_func, kwarg_name", + "open_func", [ - (open_dataset, "consolidate"), - (open_dataarray, "consolidate"), - (open_datatree, "consolidate"), - (open_groups, "consolidate"), - (open_zarr, "consolidate"), - (load_dataarray, "consolidate"), - (load_dataset, "consolidate"), + open_dataset, + open_dataarray, + open_datatree, + open_groups, + open_zarr, + load_dataarray, + load_dataset, ], ) - def test_warn_on_open(self, open_func, kwarg_name) -> None: + def test_warn_on_open(self, open_func) -> None: with pytest.warns( PendingDeprecationWarning, - match=f"default value of the ``{kwarg_name}`` argument", + match="default value of the ``consolidate`` argument", ): if open_func is open_zarr: open_zarr(self.store) else: open_func(self.store, engine="zarr") - def test_warn_on_to_zarr(self) -> None: ... + def test_warn_on_dataarray_to_zarr(self, tmp_path) -> None: + da = xr.DataArray(1) + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidate`` argument", + ): + da.to_zarr(tmp_path) + + def test_warn_on_dataset_to_zarr(self, tmp_path) -> None: + ds = xr.Dataset() + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidate`` argument", + ): + ds.to_zarr(tmp_path) + def test_warn_on_datatree_to_zarr(self, tmp_path) -> None: + dt = xr.DataTree(dataset=xr.Dataset({"a": 1})) + with pytest.warns( + PendingDeprecationWarning, + match="default value of the ``consolidate`` argument", + ): + dt.to_zarr(tmp_path) @requires_zarr @pytest.mark.skipif( From 281d38c01b1c991fc14cabe6f62693a2b571491a Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 15:21:27 -0400 Subject: [PATCH 08/11] correct type hint --- xarray/core/datatree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/datatree.py b/xarray/core/datatree.py index 7dacc6de6a6..e22df5d912e 100644 --- a/xarray/core/datatree.py +++ b/xarray/core/datatree.py @@ -1737,7 +1737,7 @@ def to_zarr( store, mode: ZarrWriteModes = "w-", encoding=None, - consolidated: bool = True, + consolidated: bool | None = None, group: str | None = None, write_inherited_coords: bool = False, compute: bool = True, From 078e21c1d4fe5069b11b1942d317162000f1b63a Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 15:22:11 -0400 Subject: [PATCH 09/11] bugfix to make default for datatree.to_zarr consistent with dataset.to_zarr --- xarray/core/datatree_io.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xarray/core/datatree_io.py b/xarray/core/datatree_io.py index 31f5a93dd5e..da79f473ff3 100644 --- a/xarray/core/datatree_io.py +++ b/xarray/core/datatree_io.py @@ -84,7 +84,7 @@ def _datatree_to_zarr( store: ZarrStoreLike, mode: ZarrWriteModes = "w-", encoding: Mapping[str, Any] | None = None, - consolidated: bool = True, + consolidated: bool | None = None, group: str | None = None, write_inherited_coords: bool = False, compute: bool = True, @@ -98,6 +98,8 @@ def _datatree_to_zarr( from zarr import consolidate_metadata + from xarray.backends.zarr import _warn_of_consolidated_metadata_deprecation + if group is not None: raise NotImplementedError( "specifying a root group for the tree has not been implemented" @@ -130,5 +132,9 @@ def _datatree_to_zarr( if "w" in mode: mode = "a" - if consolidated: + _warn_of_consolidated_metadata_deprecation( + value=consolidated, + ) + + if consolidated in [True, None]: consolidate_metadata(store) From fa80c2f262cf3d8e6230196461c073ef7354d5f4 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 15:22:27 -0400 Subject: [PATCH 10/11] issue warnings --- xarray/backends/api.py | 2 +- xarray/backends/zarr.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/xarray/backends/api.py b/xarray/backends/api.py index 61adbecee37..686571a2bb8 100644 --- a/xarray/backends/api.py +++ b/xarray/backends/api.py @@ -2194,7 +2194,7 @@ def to_zarr( ) _warn_of_consolidated_metadata_deprecation( - kwarg_name="consolidated", value=consolidated + value=consolidated, ) # validate Dataset keys, DataArray names diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index 7086dba1968..266ae5c35c2 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -44,16 +44,14 @@ from xarray.core.types import ReadBuffer, ZarrArray, ZarrGroup -def _warn_of_consolidated_metadata_deprecation( - kwarg_name: str, value: True | False | None -) -> None: +def _warn_of_consolidated_metadata_deprecation(value: True | False | None) -> None: # see issue https://github.com/pydata/xarray/issues/10122 # in some places this kwarg is called "consolidate" and in other places its called "consolidated" if value is None: emit_user_level_warning( - f"The default value of the ``{kwarg_name}`` argument to zarr IO functions will soon change." + "The default value of the ``consolidate`` argument to zarr IO functions will soon change." "The default value of ``None`` used to mean ``True``, but it will be changed to mean ``False``." - f"To preserve the same behaviour in future please pass ``{kwarg_name}=True`` explicitly." + "To preserve the same behaviour in future please pass ``consolidate=True`` explicitly." "If you are not reading and writing from high-latency stores (e.g. Zarr v2/v3 format cloud object stores) you can safely ignore this warning." "See https://github.com/pydata/xarray/issues/10122 for more information.", PendingDeprecationWarning, @@ -1515,7 +1513,7 @@ def open_zarr( ) _warn_of_consolidated_metadata_deprecation( - kwarg_name="consolidated", value=consolidated + value=consolidated, ) backend_kwargs = { @@ -1794,7 +1792,7 @@ def _get_open_params( else: missing_exc = zarr.errors.GroupNotFoundError - _warn_of_consolidated_metadata_deprecation("consolidate", value=consolidated) + _warn_of_consolidated_metadata_deprecation(value=consolidated) if consolidated in [None, True]: # open the root of the store, in case there is metadata consolidated there From 0c5b8703e7e0c58a9d2e7eac2a36c7ae75fea8ca Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Thu, 20 Mar 2025 15:30:14 -0400 Subject: [PATCH 11/11] un-generalize kwarg name --- xarray/backends/zarr.py | 5 ++--- xarray/tests/test_backends.py | 9 +++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index 266ae5c35c2..d97231d02e6 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -46,12 +46,11 @@ def _warn_of_consolidated_metadata_deprecation(value: True | False | None) -> None: # see issue https://github.com/pydata/xarray/issues/10122 - # in some places this kwarg is called "consolidate" and in other places its called "consolidated" if value is None: emit_user_level_warning( - "The default value of the ``consolidate`` argument to zarr IO functions will soon change." + "The default value of the ``consolidated`` argument to zarr IO functions will soon change." "The default value of ``None`` used to mean ``True``, but it will be changed to mean ``False``." - "To preserve the same behaviour in future please pass ``consolidate=True`` explicitly." + "To preserve the same behaviour in future please pass ``consolidated=True`` explicitly." "If you are not reading and writing from high-latency stores (e.g. Zarr v2/v3 format cloud object stores) you can safely ignore this warning." "See https://github.com/pydata/xarray/issues/10122 for more information.", PendingDeprecationWarning, diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index 34ef6a06275..8462cca2214 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -3631,7 +3631,7 @@ def create_empty_memorystore(self): def test_warn_on_open(self, open_func) -> None: with pytest.warns( PendingDeprecationWarning, - match="default value of the ``consolidate`` argument", + match="default value of the ``consolidated`` argument", ): if open_func is open_zarr: open_zarr(self.store) @@ -3642,7 +3642,7 @@ def test_warn_on_dataarray_to_zarr(self, tmp_path) -> None: da = xr.DataArray(1) with pytest.warns( PendingDeprecationWarning, - match="default value of the ``consolidate`` argument", + match="default value of the ``consolidated`` argument", ): da.to_zarr(tmp_path) @@ -3650,7 +3650,7 @@ def test_warn_on_dataset_to_zarr(self, tmp_path) -> None: ds = xr.Dataset() with pytest.warns( PendingDeprecationWarning, - match="default value of the ``consolidate`` argument", + match="default value of the ``consolidated`` argument", ): ds.to_zarr(tmp_path) @@ -3658,10 +3658,11 @@ def test_warn_on_datatree_to_zarr(self, tmp_path) -> None: dt = xr.DataTree(dataset=xr.Dataset({"a": 1})) with pytest.warns( PendingDeprecationWarning, - match="default value of the ``consolidate`` argument", + match="default value of the ``consolidated`` argument", ): dt.to_zarr(tmp_path) + @requires_zarr @pytest.mark.skipif( ON_WINDOWS,