From 08fe5d40ca5efd38d04807566f106313e4599827 Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Sun, 22 Jun 2025 22:17:17 +0530 Subject: [PATCH 1/8] update dependency --- pyproject.toml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c980c204b5f..61442f08d19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,9 +17,9 @@ dynamic = ["version"] license = "Apache-2.0" name = "xarray" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" -dependencies = ["numpy>=1.24", "packaging>=23.2", "pandas>=2.1"] +dependencies = ["numpy>=1.26", "packaging>=24.0", "pandas>=2.2"] # We don't encode minimum requirements here (though if we can write a script to # generate the text from `min_deps_check.py`, that's welcome...). We do add @@ -27,21 +27,20 @@ dependencies = ["numpy>=1.24", "packaging>=23.2", "pandas>=2.1"] # note that it's not a direct dependency of xarray. [project.optional-dependencies] -accel = ["scipy", "bottleneck", "numbagg", "numba>=0.54", "flox", "opt_einsum"] +accel = ["scipy>=1.13", "bottleneck", "numbagg>=0.8", "numba>=0.59", "flox>=0.9", "opt_einsum"] complete = ["xarray[accel,etc,io,parallel,viz]"] io = [ - "netCDF4", + "netCDF4>=1.6.0", "h5netcdf", - "scipy", - 'pydap; python_version<"3.10"', - "zarr", + "scipy>=1.13", + "zarr>=2.18", "fsspec", "cftime", "pooch", ] -etc = ["sparse"] +etc = ["sparse>=0.15"] parallel = ["dask[complete]"] -viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"] +viz = ["cartopy>=0.23", "matplotlib", "nc-time-axis", "seaborn"] types = [ "pandas-stubs", "scipy-stubs", From 742d242fd3fa37ec82a525856d63734eea5fe453 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 22 Jun 2025 17:07:34 +0000 Subject: [PATCH 2/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 9 ++++++++- xarray/core/accessor_dt.py | 2 +- xarray/core/types.py | 4 +--- xarray/namedarray/core.py | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 61442f08d19..f66aa0d1d07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,14 @@ dependencies = ["numpy>=1.26", "packaging>=24.0", "pandas>=2.2"] # note that it's not a direct dependency of xarray. [project.optional-dependencies] -accel = ["scipy>=1.13", "bottleneck", "numbagg>=0.8", "numba>=0.59", "flox>=0.9", "opt_einsum"] +accel = [ + "scipy>=1.13", + "bottleneck", + "numbagg>=0.8", + "numba>=0.59", + "flox>=0.9", + "opt_einsum", +] complete = ["xarray[accel,etc,io,parallel,viz]"] io = [ "netCDF4>=1.6.0", diff --git a/xarray/core/accessor_dt.py b/xarray/core/accessor_dt.py index c78b38caf63..a3fe42f0c4f 100644 --- a/xarray/core/accessor_dt.py +++ b/xarray/core/accessor_dt.py @@ -31,7 +31,7 @@ if sys.version_info >= (3, 11): from typing import Self else: - from typing_extensions import Self + from typing import Self def _season_from_months(months): diff --git a/xarray/core/types.py b/xarray/core/types.py index 2124aee0ad4..004f79dd29f 100644 --- a/xarray/core/types.py +++ b/xarray/core/types.py @@ -23,9 +23,7 @@ if sys.version_info >= (3, 11): from typing import Self, TypeAlias else: - from typing import TypeAlias - - from typing_extensions import Self + from typing import Self, TypeAlias except ImportError: if TYPE_CHECKING: raise diff --git a/xarray/namedarray/core.py b/xarray/namedarray/core.py index 9d5b058439e..cafbed42ba7 100644 --- a/xarray/namedarray/core.py +++ b/xarray/namedarray/core.py @@ -89,7 +89,7 @@ if sys.version_info >= (3, 11): from typing import Self else: - from typing_extensions import Self + from typing import Self T_NamedArray = TypeVar("T_NamedArray", bound="_NamedArray[Any]") T_NamedArrayInteger = TypeVar( From e9bc53933e7e0f79d61f0f196f4580606337a71b Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Sun, 22 Jun 2025 23:09:06 +0530 Subject: [PATCH 3/8] updating remaining code --- ci/requirements/all-but-numba.yml | 2 +- ci/requirements/bare-min-and-scipy.yml | 8 ++--- ci/requirements/bare-minimum.yml | 6 ++-- ci/requirements/doc.yml | 2 +- ci/requirements/environment.yml | 2 +- ci/requirements/min-all-deps.yml | 48 ++++++++++++-------------- 6 files changed, 32 insertions(+), 36 deletions(-) diff --git a/ci/requirements/all-but-numba.yml b/ci/requirements/all-but-numba.yml index 7c492aec704..712055a0ec2 100644 --- a/ci/requirements/all-but-numba.yml +++ b/ci/requirements/all-but-numba.yml @@ -4,7 +4,7 @@ channels: - nodefaults dependencies: # Pin a "very new numpy" (updated Sept 24, 2024) - - numpy>=2.1.1 + - numpy>=2.2 - aiobotocore - array-api-strict<2.4 - boto3 diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index 5e5522faaea..e63d9765184 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -12,7 +12,7 @@ dependencies: - pytest-mypy-plugins - pytest-timeout - pytest-xdist - - numpy=1.24 - - packaging=23.1 - - pandas=2.1 - - scipy=1.11 + - numpy=1.26 + - packaging=24.0 + - pandas=2.2 + - scipy=1.13 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 02e99d34af2..628571db44c 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -12,6 +12,6 @@ dependencies: - pytest-mypy-plugins - pytest-timeout - pytest-xdist - - numpy=1.24 - - packaging=23.1 - - pandas=2.1 + - numpy=1.26 + - packaging=24.0 + - pandas=2.2 diff --git a/ci/requirements/doc.yml b/ci/requirements/doc.yml index 0559f393bd0..64ea08b73ff 100644 --- a/ci/requirements/doc.yml +++ b/ci/requirements/doc.yml @@ -23,7 +23,7 @@ dependencies: - ncdata - netcdf4 - numba - - numpy>=2 + - numpy>=2.2 - packaging - pandas - pooch diff --git a/ci/requirements/environment.yml b/ci/requirements/environment.yml index fc54b6600fe..cc33d8b4681 100644 --- a/ci/requirements/environment.yml +++ b/ci/requirements/environment.yml @@ -26,7 +26,7 @@ dependencies: - numba - numbagg - numexpr - - numpy>=2 + - numpy>=2.2 - opt_einsum - packaging - pandas diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 03e14773d53..8da1b2d8ff2 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -9,38 +9,34 @@ 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.29 + - boto3=1.34 - bottleneck=1.3 - - cartopy=0.22 - - cftime=1.6 + - cartopy=0.23 + - cftime=1.6.3 - coveralls - - dask-core=2023.11 - - distributed=2023.11 - # 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 + - dask-core=2024.5.0 + - distributed=2024.5.0 + - flox=0.8 - h5netcdf=1.3 # 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 + - h5py=3.11 + - hdf5=1.14 - hypothesis - - iris=3.7 - - lxml=4.9 # Optional dep of pydap - - matplotlib-base=3.8 + - iris=3.9 + - lxml=5.2 # Optional dep of pydap + - matplotlib-base=3.9 - 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.57 - - numbagg=0.6 - - numpy=1.24 - - packaging=23.2 - - pandas=2.1 - - pint=0.22 + - netcdf4=1.6.5 + - numba=0.59 + - numbagg=0.7 + - numpy=1.26 + - packaging=24.0 + - pandas=2.2 + - pint=0.23 - pip - pydap=3.5 - pytest @@ -50,9 +46,9 @@ dependencies: - pytest-timeout - pytest-xdist - rasterio=1.3 - - scipy=1.11 + - scipy=1.13 - seaborn=0.13 - - sparse=0.14 + - sparse=0.15 - toolz=0.12 - - typing_extensions=4.8 - - zarr=2.16 + - typing_extensions=4.11 + - zarr=2.18 From 1bdcc64e4f751d9f956af57f2895a9e83bedecbc Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Mon, 23 Jun 2025 22:53:00 +0530 Subject: [PATCH 4/8] resolving comments --- ci/requirements/bare-min-and-scipy.yml | 2 +- ci/requirements/bare-minimum.yml | 2 +- ci/requirements/min-all-deps.yml | 5 ++- doc/whats-new.rst | 46 ++++++++++++++++++++++++++ pyproject.toml | 1 + xarray/core/accessor_dt.py | 7 +--- xarray/core/datatree_mapping.py | 7 +--- xarray/core/types.py | 16 ++------- xarray/namedarray/_typing.py | 6 +--- xarray/namedarray/core.py | 6 +--- 10 files changed, 57 insertions(+), 41 deletions(-) diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index e63d9765184..6001a2cc642 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -3,7 +3,7 @@ channels: - conda-forge - nodefaults dependencies: - - python=3.10 + - python=3.11 - coveralls - pip - pytest diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 628571db44c..0ffc6fc62bc 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -3,7 +3,7 @@ channels: - conda-forge - nodefaults dependencies: - - python=3.10 + - python=3.11 - coveralls - pip - pytest diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 8da1b2d8ff2..d9ddb642b18 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -7,7 +7,7 @@ dependencies: # Run ci/min_deps_check.py to verify that this file respects the policy. # When upgrading python, numpy, or pandas, must also change # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - - python=3.10 + - python=3.11 - array-api-strict=1.0 # dependency for testing the array api compat - boto3=1.34 - bottleneck=1.3 @@ -16,7 +16,7 @@ dependencies: - coveralls - dask-core=2024.5.0 - distributed=2024.5.0 - - flox=0.8 + - flox=0.9 - h5netcdf=1.3 # h5py and hdf5 tend to cause conflicts # for e.g. hdf5 1.12 conflicts with h5py=3.1 @@ -50,5 +50,4 @@ dependencies: - seaborn=0.13 - sparse=0.15 - toolz=0.12 - - typing_extensions=4.11 - zarr=2.18 diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 607661ed30b..ff77bd17644 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -12,6 +12,52 @@ v2025.07.0 (unreleased) New Features ~~~~~~~~~~~~ +Update the minimum versions of dependencies to the following: ++----------------------+---------------+--------------+ +| Dependency | Old Version | New Version | ++======================+===============+==============+ +| Python | 3.10 | 3.11 | ++----------------------+---------------+--------------+ +| array-api-strict | 1.0 | 1.1 | ++----------------------+---------------+--------------+ +| boto3 | 1.29 | 1.34 | ++----------------------+---------------+--------------+ +| cartopy | 0.22 | 0.23 | ++----------------------+---------------+--------------+ +| dask-core | 2023.11 | 2024.5.0 | ++----------------------+---------------+--------------+ +| distributed | 2023.11 | 2024.5.0 | ++----------------------+---------------+--------------+ +| flox | 0.7 | 0.9 | ++----------------------+---------------+--------------+ +| h5py | 3.8 | 3.11 | ++----------------------+---------------+--------------+ +| hdf5 | 1.12 | 1.14 | ++----------------------+---------------+--------------+ +| iris | 3.7 | 3.9 | ++----------------------+---------------+--------------+ +| lxml | 4.9 | 5.2 | ++----------------------+---------------+--------------+ +| numba | 0.57 | 0.59 | ++----------------------+---------------+--------------+ +| numbagg | 0.6 | 0.8 | ++----------------------+---------------+--------------+ +| numpy | 1.24 | 1.26 | ++----------------------+---------------+--------------+ +| packaging | 23.2 | 24.0 | ++----------------------+---------------+--------------+ +| pandas | 2.1 | 2.2 | ++----------------------+---------------+--------------+ +| pint | 0.22 | 0.24 | ++----------------------+---------------+--------------+ +| pydap | N/A | 3.5 | ++----------------------+---------------+--------------+ +| scipy | 1.11 | 1.13 | ++----------------------+---------------+--------------+ +| sparse | 0.14 | 0.15 | ++----------------------+---------------+--------------+ +| typing_extensions | 4.8 | 4.11 | ++----------------------+---------------+--------------+ Breaking changes diff --git a/pyproject.toml b/pyproject.toml index f66aa0d1d07..3d678882b34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ complete = ["xarray[accel,etc,io,parallel,viz]"] io = [ "netCDF4>=1.6.0", "h5netcdf", + "pydap", "scipy>=1.13", "zarr>=2.18", "fsspec", diff --git a/xarray/core/accessor_dt.py b/xarray/core/accessor_dt.py index a3fe42f0c4f..86e875cab5c 100644 --- a/xarray/core/accessor_dt.py +++ b/xarray/core/accessor_dt.py @@ -20,7 +20,7 @@ from xarray.namedarray.utils import is_duck_dask_array if TYPE_CHECKING: - import sys + from typing import Self from numpy.typing import DTypeLike @@ -28,11 +28,6 @@ from xarray.core.dataset import Dataset from xarray.core.types import CFCalendar - if sys.version_info >= (3, 11): - from typing import Self - else: - from typing import Self - def _season_from_months(months): """Compute season (DJF, MAM, JJA, SON) from month ordinal""" diff --git a/xarray/core/datatree_mapping.py b/xarray/core/datatree_mapping.py index 6262c7f19cd..00e575ef448 100644 --- a/xarray/core/datatree_mapping.py +++ b/xarray/core/datatree_mapping.py @@ -1,6 +1,5 @@ from __future__ import annotations -import sys from collections.abc import Callable, Mapping from typing import TYPE_CHECKING, Any, cast, overload @@ -162,11 +161,7 @@ def wrapper(*args, **kwargs): def add_note(err: BaseException, msg: str) -> None: - # TODO: remove once python 3.10 can be dropped - if sys.version_info < (3, 11): - err.__notes__ = getattr(err, "__notes__", []) + [msg] # type: ignore[attr-defined] - else: - err.add_note(msg) + err.add_note(msg) def _check_single_set_return_values(path_to_node: str, obj: Any) -> int | None: diff --git a/xarray/core/types.py b/xarray/core/types.py index 004f79dd29f..d3fd0180104 100644 --- a/xarray/core/types.py +++ b/xarray/core/types.py @@ -1,7 +1,6 @@ from __future__ import annotations import datetime -import sys from collections.abc import Callable, Collection, Hashable, Iterator, Mapping, Sequence from types import EllipsisType from typing import ( @@ -9,7 +8,9 @@ Any, Literal, Protocol, + Self, SupportsIndex, + TypeAlias, TypeVar, Union, overload, @@ -18,19 +19,6 @@ import numpy as np import pandas as pd - -try: - if sys.version_info >= (3, 11): - from typing import Self, TypeAlias - else: - from typing import Self, TypeAlias -except ImportError: - if TYPE_CHECKING: - raise - else: - Self: Any = None - - from numpy._typing import _SupportsDType from numpy.typing import ArrayLike diff --git a/xarray/namedarray/_typing.py b/xarray/namedarray/_typing.py index 2dba06a5d44..635adc89f08 100644 --- a/xarray/namedarray/_typing.py +++ b/xarray/namedarray/_typing.py @@ -1,6 +1,5 @@ from __future__ import annotations -import sys from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence from enum import Enum from types import EllipsisType, ModuleType @@ -20,10 +19,7 @@ import numpy as np try: - if sys.version_info >= (3, 11): - from typing import TypeAlias - else: - from typing import TypeAlias + from typing import TypeAlias except ImportError: if TYPE_CHECKING: raise diff --git a/xarray/namedarray/core.py b/xarray/namedarray/core.py index cafbed42ba7..dac8162ca45 100644 --- a/xarray/namedarray/core.py +++ b/xarray/namedarray/core.py @@ -2,7 +2,6 @@ import copy import math -import sys import warnings from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence from itertools import starmap @@ -86,10 +85,7 @@ PostComputeCallable: Any # type: ignore[no-redef] PostPersistCallable: Any # type: ignore[no-redef] - if sys.version_info >= (3, 11): - from typing import Self - else: - from typing import Self + from typing import Self T_NamedArray = TypeVar("T_NamedArray", bound="_NamedArray[Any]") T_NamedArrayInteger = TypeVar( From 1b29658f2519a5d5d9c42fcb7d8d690a5f0fe521 Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Mon, 23 Jun 2025 23:05:34 +0530 Subject: [PATCH 5/8] additional ci adjustments --- .binder/environment.yml | 2 +- .github/workflows/ci-additional.yaml | 8 ++++---- .github/workflows/ci.yaml | 10 +++++----- doc/contribute/contributing.rst | 2 +- doc/getting-started-guide/installing.rst | 2 +- xarray/util/generate_ops.py | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.binder/environment.yml b/.binder/environment.yml index a60eb372831..2c57bd1121c 100644 --- a/.binder/environment.yml +++ b/.binder/environment.yml @@ -2,7 +2,7 @@ name: xarray-examples channels: - conda-forge dependencies: - - python=3.10 + - python=3.11 - boto3 - bottleneck - cartopy diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 95181ae3761..345c7a8e234 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -132,7 +132,7 @@ jobs: fail_ci_if_error: false mypy-min: - name: Mypy 3.10 + name: Mypy 3.11 runs-on: "ubuntu-latest" needs: detect-ci-trigger defaults: @@ -140,7 +140,7 @@ jobs: shell: bash -l {0} env: CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" steps: - uses: actions/checkout@v4 @@ -239,7 +239,7 @@ jobs: fail_ci_if_error: false pyright39: - name: Pyright 3.10 + name: Pyright 3.11 runs-on: "ubuntu-latest" needs: detect-ci-trigger if: | @@ -252,7 +252,7 @@ jobs: shell: bash -l {0} env: CONDA_ENV_FILE: ci/requirements/environment.yml - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 76f4f0d5e7e..b115d605ee3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,18 +47,18 @@ jobs: matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] # Bookend python versions - python-version: ["3.10", "3.13"] + python-version: ["3.11", "3.13"] env: [""] include: # Minimum python version: - env: "bare-minimum" - python-version: "3.10" + python-version: "3.11" os: ubuntu-latest - env: "bare-min-and-scipy" - python-version: "3.10" + python-version: "3.11" os: ubuntu-latest - env: "min-all-deps" - python-version: "3.10" + python-version: "3.11" os: ubuntu-latest # Latest python version: - env: "all-but-numba" @@ -73,7 +73,7 @@ jobs: # The mypy tests must be executed using only 1 process in order to guarantee # predictable mypy output messages for comparison to expectations. - env: "mypy" - python-version: "3.10" + python-version: "3.11" numprocesses: 1 os: ubuntu-latest - env: "mypy" diff --git a/doc/contribute/contributing.rst b/doc/contribute/contributing.rst index e0ece730cd1..339050a7f8a 100644 --- a/doc/contribute/contributing.rst +++ b/doc/contribute/contributing.rst @@ -290,7 +290,7 @@ We'll now kick off a two-step process: .. code-block:: sh # Create and activate the build environment - conda create -c conda-forge -n xarray-tests python=3.10 + conda create -c conda-forge -n xarray-tests python=3.11 # This is for Linux and MacOS conda env update -f ci/requirements/environment.yml diff --git a/doc/getting-started-guide/installing.rst b/doc/getting-started-guide/installing.rst index 4910047014e..dfab37171c2 100644 --- a/doc/getting-started-guide/installing.rst +++ b/doc/getting-started-guide/installing.rst @@ -6,7 +6,7 @@ Installation Required dependencies --------------------- -- Python (3.10 or later) +- Python (3.11 or later) - `numpy `__ (1.23 or later) - `packaging `__ (23.1 or later) - `pandas `__ (2.0 or later) diff --git a/xarray/util/generate_ops.py b/xarray/util/generate_ops.py index 3300bbf594a..0c5ac2f2eb8 100644 --- a/xarray/util/generate_ops.py +++ b/xarray/util/generate_ops.py @@ -133,7 +133,7 @@ def {{ method }}(self, *args: Any, **kwargs: Any) -> Self: # We require a "hack" to tell type checkers that e.g. Variable + DataArray = DataArray # In reality this returns NotImplemented, but this is not a valid type in python 3.9. # Therefore, we return DataArray. In reality this would call DataArray.__add__(Variable) -# TODO: change once python 3.10 is the minimum. +# TODO: change once python 3.11 is the minimum. # # Mypy seems to require that __iadd__ and __add__ have the same signature. # This requires some extra type: ignores[misc] in the inplace methods :/ From 9a7753acd7266594fb1000caaf96b2025120483c Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Mon, 23 Jun 2025 23:25:31 +0530 Subject: [PATCH 6/8] ci workflow update --- ci/requirements/min-all-deps.yml | 8 +- doc/whats-new.rst | 123 +++++++++++++++++++------------ 2 files changed, 80 insertions(+), 51 deletions(-) diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index d9ddb642b18..5d7955e52fc 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -8,7 +8,7 @@ dependencies: # When upgrading python, numpy, or pandas, must also change # doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py. - python=3.11 - - array-api-strict=1.0 # dependency for testing the array api compat + - array-api-strict=1.1 # dependency for testing the array api compat - boto3=1.34 - bottleneck=1.3 - cartopy=0.23 @@ -25,18 +25,18 @@ dependencies: - hdf5=1.14 - hypothesis - iris=3.9 - - lxml=5.2 # Optional dep of pydap + - lxml=5.1 # Optional dep of pydap - matplotlib-base=3.9 - 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.5 - numba=0.59 - - numbagg=0.7 + - numbagg=0.8 - numpy=1.26 - packaging=24.0 - pandas=2.2 - - pint=0.23 + - pint=0.24 - pip - pydap=3.5 - pytest diff --git a/doc/whats-new.rst b/doc/whats-new.rst index ff77bd17644..20b6380a3c9 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -12,57 +12,86 @@ v2025.07.0 (unreleased) New Features ~~~~~~~~~~~~ -Update the minimum versions of dependencies to the following: -+----------------------+---------------+--------------+ -| Dependency | Old Version | New Version | -+======================+===============+==============+ -| Python | 3.10 | 3.11 | -+----------------------+---------------+--------------+ -| array-api-strict | 1.0 | 1.1 | -+----------------------+---------------+--------------+ -| boto3 | 1.29 | 1.34 | -+----------------------+---------------+--------------+ -| cartopy | 0.22 | 0.23 | -+----------------------+---------------+--------------+ -| dask-core | 2023.11 | 2024.5.0 | -+----------------------+---------------+--------------+ -| distributed | 2023.11 | 2024.5.0 | -+----------------------+---------------+--------------+ -| flox | 0.7 | 0.9 | -+----------------------+---------------+--------------+ -| h5py | 3.8 | 3.11 | -+----------------------+---------------+--------------+ -| hdf5 | 1.12 | 1.14 | -+----------------------+---------------+--------------+ -| iris | 3.7 | 3.9 | -+----------------------+---------------+--------------+ -| lxml | 4.9 | 5.2 | -+----------------------+---------------+--------------+ -| numba | 0.57 | 0.59 | -+----------------------+---------------+--------------+ -| numbagg | 0.6 | 0.8 | -+----------------------+---------------+--------------+ -| numpy | 1.24 | 1.26 | -+----------------------+---------------+--------------+ -| packaging | 23.2 | 24.0 | -+----------------------+---------------+--------------+ -| pandas | 2.1 | 2.2 | -+----------------------+---------------+--------------+ -| pint | 0.22 | 0.24 | -+----------------------+---------------+--------------+ -| pydap | N/A | 3.5 | -+----------------------+---------------+--------------+ -| scipy | 1.11 | 1.13 | -+----------------------+---------------+--------------+ -| sparse | 0.14 | 0.15 | -+----------------------+---------------+--------------+ -| typing_extensions | 4.8 | 4.11 | -+----------------------+---------------+--------------+ - Breaking changes ~~~~~~~~~~~~~~~~ +The minimum versions of some dependencies were changed (:issue:`10417`, :pull:`10438`): +By `Dhruva Kumar Kaushal `_. + +.. list-table:: + :header-rows: 1 + :widths: 30 20 20 + + * - Dependency + - Old Version + - New Version + * - Python + - 3.10 + - 3.11 + * - array-api-strict + - 1.0 + - 1.1 + * - boto3 + - 1.29 + - 1.34 + * - cartopy + - 0.22 + - 0.23 + * - dask-core + - 2023.11 + - 2024.5.0 + * - distributed + - 2023.11 + - 2024.5.0 + * - flox + - 0.7 + - 0.9 + * - h5py + - 3.8 + - 3.11 + * - hdf5 + - 1.12 + - 1.14 + * - iris + - 3.7 + - 3.9 + * - lxml + - 4.9 + - 5.1 + * - numba + - 0.57 + - 0.59 + * - numbagg + - 0.6 + - 0.8 + * - numpy + - 1.24 + - 1.26 + * - packaging + - 23.2 + - 24.0 + * - pandas + - 2.1 + - 2.2 + * - pint + - 0.22 + - 0.24 + * - pydap + - N/A + - 3.5 + * - scipy + - 1.11 + - 1.13 + * - sparse + - 0.14 + - 0.15 + * - typing_extensions + - 4.8 + - Removed + * - zarr + - 2.16 + - 2.18 Deprecations ~~~~~~~~~~~~ From 2fad196f91d35cb0507839bb954b5843e1c09c3c Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Mon, 23 Jun 2025 23:30:14 +0530 Subject: [PATCH 7/8] updating docs --- doc/getting-started-guide/installing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/getting-started-guide/installing.rst b/doc/getting-started-guide/installing.rst index dfab37171c2..480ee69111b 100644 --- a/doc/getting-started-guide/installing.rst +++ b/doc/getting-started-guide/installing.rst @@ -7,9 +7,9 @@ Required dependencies --------------------- - Python (3.11 or later) -- `numpy `__ (1.23 or later) -- `packaging `__ (23.1 or later) -- `pandas `__ (2.0 or later) +- `numpy `__ (1.26 or later) +- `packaging `__ (24.0 or later) +- `pandas `__ (2.2 or later) .. _optional-dependencies: From 4572806a19ba3d1e6b935290500c7622ccc9d52b Mon Sep 17 00:00:00 2001 From: DHRUVA KUMAR KAUSHAL Date: Tue, 24 Jun 2025 00:13:46 +0530 Subject: [PATCH 8/8] final checks --- ci/requirements/bare-min-and-scipy.yml | 2 +- ci/requirements/bare-minimum.yml | 2 +- ci/requirements/min-all-deps.yml | 16 ++++++++-------- doc/getting-started-guide/installing.rst | 2 +- doc/whats-new.rst | 14 ++++++++++---- pyproject.toml | 3 +-- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/ci/requirements/bare-min-and-scipy.yml b/ci/requirements/bare-min-and-scipy.yml index 6001a2cc642..bb25af67651 100644 --- a/ci/requirements/bare-min-and-scipy.yml +++ b/ci/requirements/bare-min-and-scipy.yml @@ -13,6 +13,6 @@ dependencies: - pytest-timeout - pytest-xdist - numpy=1.26 - - packaging=24.0 + - packaging=24.1 - pandas=2.2 - scipy=1.13 diff --git a/ci/requirements/bare-minimum.yml b/ci/requirements/bare-minimum.yml index 0ffc6fc62bc..fafc1aa034a 100644 --- a/ci/requirements/bare-minimum.yml +++ b/ci/requirements/bare-minimum.yml @@ -13,5 +13,5 @@ dependencies: - pytest-timeout - pytest-xdist - numpy=1.26 - - packaging=24.0 + - packaging=24.1 - pandas=2.2 diff --git a/ci/requirements/min-all-deps.yml b/ci/requirements/min-all-deps.yml index 5d7955e52fc..b7698c0abd3 100644 --- a/ci/requirements/min-all-deps.yml +++ b/ci/requirements/min-all-deps.yml @@ -10,12 +10,12 @@ dependencies: - python=3.11 - array-api-strict=1.1 # dependency for testing the array api compat - boto3=1.34 - - bottleneck=1.3 + - bottleneck=1.4 - cartopy=0.23 - - cftime=1.6.3 + - cftime=1.6 - coveralls - - dask-core=2024.5.0 - - distributed=2024.5.0 + - dask-core=2024.6 + - distributed=2024.6 - flox=0.9 - h5netcdf=1.3 # h5py and hdf5 tend to cause conflicts @@ -26,15 +26,15 @@ dependencies: - hypothesis - iris=3.9 - lxml=5.1 # Optional dep of pydap - - matplotlib-base=3.9 + - matplotlib-base=3.8 - 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.5 - - numba=0.59 + - netcdf4=1.6 + - numba=0.60 - numbagg=0.8 - numpy=1.26 - - packaging=24.0 + - packaging=24.1 - pandas=2.2 - pint=0.24 - pip diff --git a/doc/getting-started-guide/installing.rst b/doc/getting-started-guide/installing.rst index 480ee69111b..cca54585c5f 100644 --- a/doc/getting-started-guide/installing.rst +++ b/doc/getting-started-guide/installing.rst @@ -8,7 +8,7 @@ Required dependencies - Python (3.11 or later) - `numpy `__ (1.26 or later) -- `packaging `__ (24.0 or later) +- `packaging `__ (24.1 or later) - `pandas `__ (2.2 or later) .. _optional-dependencies: diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 20b6380a3c9..140487185ee 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -35,15 +35,18 @@ By `Dhruva Kumar Kaushal `_. * - boto3 - 1.29 - 1.34 + * - bottleneck + - 1.3 + - 1.4 * - cartopy - 0.22 - 0.23 * - dask-core - 2023.11 - - 2024.5.0 + - 2024.6 * - distributed - 2023.11 - - 2024.5.0 + - 2024.6 * - flox - 0.7 - 0.9 @@ -59,9 +62,12 @@ By `Dhruva Kumar Kaushal `_. * - lxml - 4.9 - 5.1 + * - matplotlib-base + - 3.7 + - 3.8 * - numba - 0.57 - - 0.59 + - 0.60 * - numbagg - 0.6 - 0.8 @@ -70,7 +76,7 @@ By `Dhruva Kumar Kaushal `_. - 1.26 * - packaging - 23.2 - - 24.0 + - 24.1 * - pandas - 2.1 - 2.2 diff --git a/pyproject.toml b/pyproject.toml index 3d678882b34..0c1e9fb25f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -19,7 +18,7 @@ name = "xarray" readme = "README.md" requires-python = ">=3.11" -dependencies = ["numpy>=1.26", "packaging>=24.0", "pandas>=2.2"] +dependencies = ["numpy>=1.26", "packaging>=24.1", "pandas>=2.2"] # We don't encode minimum requirements here (though if we can write a script to # generate the text from `min_deps_check.py`, that's welcome...). We do add