From 67c9a5fd15b097a23fa8941b60d03f598ca41554 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Sun, 10 Dec 2023 11:04:43 -0500 Subject: [PATCH] Fix for xarray v2023.12.0 https://github.com/xarray-contrib/datatree/pull/294 * fix import of xarray.testing internals that was changed by https://github.com/pydata/xarray/pull/8404 * bump minimum required version of xarray * linting --- datatree/testing.py | 2 +- docs/source/whats-new.rst | 4 ++++ pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/datatree/testing.py b/datatree/testing.py index ebe32cb..1cbcdf2 100644 --- a/datatree/testing.py +++ b/datatree/testing.py @@ -1,4 +1,4 @@ -from xarray.testing import ensure_warnings +from xarray.testing.assertions import ensure_warnings from .datatree import DataTree from .formatting import diff_tree_repr diff --git a/docs/source/whats-new.rst b/docs/source/whats-new.rst index 9d46c95..95bdcaf 100644 --- a/docs/source/whats-new.rst +++ b/docs/source/whats-new.rst @@ -26,6 +26,10 @@ New Features Breaking changes ~~~~~~~~~~~~~~~~ +- Minimum required version of xarray is now 2023.12.0, i.e. the latest version. + This is required to prevent recent changes to xarray's internals from breaking datatree. + (:issue:`293`, :pull:`294`) + By `Tom Nicholas `_. - Change default write mode of :py:meth:`DataTree.to_zarr` to ``'w-'`` to match ``xarray`` default and prevent accidental directory overwrites. (:issue:`274`, :pull:`275`) By `Sam Levang `_. diff --git a/pyproject.toml b/pyproject.toml index 86ad363..40f7d5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "xarray >=2022.6.0", + "xarray >=2023.12.0", "packaging", ] dynamic = ["version"]