From 25debff967f7cfcd4a7cbe4b225edaef2ec6ddaa Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 5 Sep 2024 11:23:36 -0600 Subject: [PATCH] Bump minimum versions for dependencies (#9434) * Bump minimum dependency versions Closes #9363 * Update doc/whats-new.rst Co-authored-by: Justus Magin * bump netcdf4 * fix rtd * Revert "bump netcdf4" This reverts commit ae285b13e60e27a511d117691c718db79d12dba6. --------- Co-authored-by: Justus Magin --- ci/requirements/bare-minimum.yml | 4 ++-- ci/requirements/min-all-deps.yml | 24 ++++++++++++------------ doc/whats-new.rst | 18 ++++++++++++++++++ pyproject.toml | 4 ++-- xarray/tests/__init__.py | 1 - xarray/tests/test_groupby.py | 4 ++-- 6 files changed, 36 insertions(+), 19 deletions(-) diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 0878222da35..d9590d95165 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -11,6 +11,6 @@ dependencies: - pytest-env - pytest-xdist - pytest-timeout - - numpy=1.23 + - numpy=1.24 - packaging=23.1 - - pandas=2.0 + - pandas=2.1 diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index ea1dc7b7fb0..b5a9176a62b 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -9,37 +9,37 @@ dependencies: # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - python=3.10 - array-api-strict=1.0 # dependency for testing the array api compat - - boto3=1.26 + - boto3=1.28 - bottleneck=1.3 - - cartopy=0.21 + - cartopy=0.22 - cftime=1.6 - coveralls - - dask-core=2023.4 - - distributed=2023.4 + - dask-core=2023.9 + - distributed=2023.9 # Flox > 0.8 has a bug with numbagg versions # It will require numbagg > 0.6 # so we should just skip that series eventually # or keep flox pinned for longer than necessary - flox=0.7 - - h5netcdf=1.1 + - h5netcdf=1.2 # h5py and hdf5 tend to cause conflicts # for e.g. hdf5 1.12 conflicts with h5py=3.1 # prioritize bumping other packages instead - h5py=3.8 - hdf5=1.12 - hypothesis - - iris=3.4 + - iris=3.7 - lxml=4.9 # Optional dep of pydap - matplotlib-base=3.7 - nc-time-axis=1.4 # netcdf follows a 1.major.minor[.patch] convention # (see https://github.com/Unidata/netcdf4-python/issues/1090) - netcdf4=1.6.0 - - numba=0.56 + - numba=0.57 - numbagg=0.2.1 - - numpy=1.23 + - numpy=1.24 - packaging=23.1 - - pandas=2.0 + - pandas=2.1 - pint=0.22 - pip - pydap=3.4 @@ -49,9 +49,9 @@ dependencies: - pytest-xdist - pytest-timeout - rasterio=1.3 - - scipy=1.10 + - scipy=1.11 - seaborn=0.12 - sparse=0.14 - toolz=0.12 - - typing_extensions=4.5 - - zarr=2.14 + - typing_extensions=4.7 + - zarr=2.16 diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 4122e1637f3..54fea2b73ea 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -35,6 +35,24 @@ New Features Breaking changes ~~~~~~~~~~~~~~~~ - Support for ``python 3.9`` has been dropped (:pull:`8937`) +- The minimum versions of some dependencies were changed + + ===================== ========= ======= + Package Old New + ===================== ========= ======= + boto3 1.26 1.28 + cartopy 0.21 0.22 + dask-core 2023.4 2023.9 + distributed 2023.4 2023.9 + h5netcdf 1.1 1.2 + iris 3.4 3.7 + numba 0.56 0.57 + numpy 1.23 1.24 + pandas 2.0 2.1 + scipy 1.10 1.11 + typing_extensions 4.5 4.7 + zarr 2.14 2.16 + ===================== ========= ======= Deprecations diff --git a/pyproject.toml b/pyproject.toml index 5a94e44a442..5a0029f3624 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,9 +22,9 @@ readme = "README.md" requires-python = ">=3.10" dependencies = [ - "numpy>=1.23", + "numpy>=1.24", "packaging>=23.1", - "pandas>=2.0", + "pandas>=2.1", ] [project.optional-dependencies] diff --git a/xarray/tests/__init__.py b/xarray/tests/__init__.py index 064a4100fdc..0e43738ed99 100644 --- a/xarray/tests/__init__.py +++ b/xarray/tests/__init__.py @@ -134,7 +134,6 @@ def _importorskip( has_pint, requires_pint = _importorskip("pint") has_numexpr, requires_numexpr = _importorskip("numexpr") has_flox, requires_flox = _importorskip("flox") -has_pandas_ge_2_1, __ = _importorskip("pandas", "2.1") has_pandas_ge_2_2, __ = _importorskip("pandas", "2.2") has_pandas_3, requires_pandas_3 = _importorskip("pandas", "3.0.0.dev0") diff --git a/xarray/tests/test_groupby.py b/xarray/tests/test_groupby.py index b5d7312d9bb..a6de4697b8a 100644 --- a/xarray/tests/test_groupby.py +++ b/xarray/tests/test_groupby.py @@ -29,7 +29,7 @@ create_test_data, has_cftime, has_flox, - has_pandas_ge_2_1, + has_pandas_ge_2_2, requires_cftime, requires_dask, requires_flox, @@ -135,7 +135,7 @@ def test_multi_index_groupby_sum() -> None: ) assert_equal(expected, ds) - if not has_pandas_ge_2_1: + if not has_pandas_ge_2_2: # the next line triggers a mysterious multiindex error on pandas 2.0 return