Skip to content

update dependency #10438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: xarray-examples
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11
- boto3
- bottleneck
- cartopy
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ 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:
run:
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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/all-but-numba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions ci/requirements/bare-min-and-scipy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.10
- python=3.11
- coveralls
- pip
- pytest
Expand All @@ -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.1
- pandas=2.2
- scipy=1.13
8 changes: 4 additions & 4 deletions ci/requirements/bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.10
- python=3.11
- coveralls
- pip
- pytest
Expand All @@ -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.1
- pandas=2.2
2 changes: 1 addition & 1 deletion ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
- ncdata
- netcdf4
- numba
- numpy>=2
- numpy>=2.2
- packaging
- pandas
- pooch
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
- numba
- numbagg
- numexpr
- numpy>=2
- numpy>=2.2
- opt_einsum
- packaging
- pandas
Expand Down
49 changes: 22 additions & 27 deletions ci/requirements/min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,36 @@ 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
- array-api-strict=1.0 # dependency for testing the array api compat
- boto3=1.29
- bottleneck=1.3
- cartopy=0.22
- python=3.11
- array-api-strict=1.1 # dependency for testing the array api compat
- boto3=1.34
- bottleneck=1.4
- cartopy=0.23
- cftime=1.6
- 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.6
- distributed=2024.6
- flox=0.9
- 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
- iris=3.9
- lxml=5.1 # Optional dep of pydap
- 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.0
- numba=0.57
- numbagg=0.6
- numpy=1.24
- packaging=23.2
- pandas=2.1
- pint=0.22
- netcdf4=1.6
- numba=0.60
- numbagg=0.8
- numpy=1.26
- packaging=24.1
- pandas=2.2
- pint=0.24
- pip
- pydap=3.5
- pytest
Expand All @@ -50,9 +46,8 @@ 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
- zarr=2.18
2 changes: 1 addition & 1 deletion doc/contribute/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions doc/getting-started-guide/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Installation
Required dependencies
---------------------

- Python (3.10 or later)
- `numpy <https://www.numpy.org/>`__ (1.23 or later)
- `packaging <https://packaging.pypa.io/en/latest/#>`__ (23.1 or later)
- `pandas <https://pandas.pydata.org/>`__ (2.0 or later)
- Python (3.11 or later)
- `numpy <https://www.numpy.org/>`__ (1.26 or later)
- `packaging <https://packaging.pypa.io/en/latest/#>`__ (24.1 or later)
- `pandas <https://pandas.pydata.org/>`__ (2.2 or later)

.. _optional-dependencies:

Expand Down
83 changes: 82 additions & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,91 @@ v2025.07.0 (unreleased)
New Features
~~~~~~~~~~~~


Breaking changes
~~~~~~~~~~~~~~~~

The minimum versions of some dependencies were changed (:issue:`10417`, :pull:`10438`):
By `Dhruva Kumar Kaushal <https://github.com/dhruvak001>`_.

.. 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
* - bottleneck
- 1.3
- 1.4
* - cartopy
- 0.22
- 0.23
* - dask-core
- 2023.11
- 2024.6
* - distributed
- 2023.11
- 2024.6
* - 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
* - matplotlib-base
- 3.7
- 3.8
* - numba
- 0.57
- 0.60
* - numbagg
- 0.6
- 0.8
* - numpy
- 1.24
- 1.26
* - packaging
- 23.2
- 24.1
* - 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
~~~~~~~~~~~~
Expand Down
26 changes: 16 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -17,31 +16,38 @@ 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.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
# `numba>=0.54` here because of https://github.com/astral-sh/uv/issues/7881;
# 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",
"pydap",
"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",
Expand Down
Loading
Loading