Skip to content

update dependencies; drop python 3.10 #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

Merged
merged 9 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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 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
8 changes: 4 additions & 4 deletions ci/requirements/bare-min-and-scipy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions ci/requirements/bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
48 changes: 22 additions & 26 deletions ci/requirements/min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
24 changes: 15 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,37 @@ 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
# `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",
"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
2 changes: 1 addition & 1 deletion xarray/core/accessor_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 1 addition & 3 deletions xarray/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion xarray/namedarray/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy