diff --git a/Changelog.rst b/Changelog.rst index fa6a0a9b9..bf3854c47 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -1,3 +1,12 @@ +Version NEXTVERSION +-------------- + +**2025-??-??** + +* New dependency: ``distributed>=2025.5.1`` + +---- + Version 1.12.2.0 ---------------- diff --git a/cfdm/__init__.py b/cfdm/__init__.py index c74ad6946..54e43089e 100644 --- a/cfdm/__init__.py +++ b/cfdm/__init__.py @@ -166,6 +166,20 @@ f"Got {dask.__version__} at {dask.__file__}" ) +# Check the version of distributed +try: + import distributed +except ImportError as error1: + raise ImportError(_error0 + str(error1)) +else: + _minimum_vn = "2025.5.1" + if Version(distributed.__version__) < Version(_minimum_vn): + raise ValueError( + "Bad distributed version: cfdm requires " + f"distributed>={_minimum_vn}. " + f"Got {distributed.__version__} at {distributed.__file__}" + ) + # Check the version of uritools try: import uritools diff --git a/cfdm/functions.py b/cfdm/functions.py index 09ed70833..e69312a60 100644 --- a/cfdm/functions.py +++ b/cfdm/functions.py @@ -429,6 +429,7 @@ def environment(display=True, paths=True): s3fs: 2024.12.0 scipy: 1.15.1 dask: 2025.5.1 + distributed: 2025.5.1 cftime: 1.6.4.post1 cfunits: 3.3.7 cfdm: 1.12.2.0 @@ -452,6 +453,7 @@ def environment(display=True, paths=True): "s3fs": _get_module_info("s3fs"), "scipy": _get_module_info("scipy"), "dask": _get_module_info("dask"), + "distributed": _get_module_info("distributed"), "cftime": _get_module_info("cftime"), "cfunits": _get_module_info("cfunits"), "cfdm": (__version__, os.path.abspath(__file__)), diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 40ec145a7..90c9c9ed3 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -199,7 +199,10 @@ The cfdm package requires: * `s3fs `_, version 2024.6.0 or newer. -* `dask `_, versions 2025.5.1 or newer. +* `dask `_, version 2025.5.1 or newer. + +* `distributed `_, version 2025.5.1 + or newer. * `packaging `_, version 20.0 or newer. diff --git a/requirements.txt b/requirements.txt index 3e010cd70..3b37323a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ h5netcdf>=1.3.0 h5py>=3.12.0 s3fs>=2024.6.0 dask>=2025.5.1 +distributed>=2025.5.1 uritools>=4.0.3 cfunits>=3.3.7 zarr>=3.0.8