`_.
+
+.. 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
~~~~~~~~~~~~
diff --git a/pyproject.toml b/pyproject.toml
index 4cda7385330..8cfbb6851b3 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",
@@ -17,9 +16,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.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
@@ -27,21 +26,28 @@ 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",
+ "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",
diff --git a/xarray/core/accessor_dt.py b/xarray/core/accessor_dt.py
index c78b38caf63..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_extensions 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 050a412005d..f9fd5505b66 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 d51ba59120e..736a11f5f17 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,21 +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 TypeAlias
-
- from typing_extensions import Self
-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/core.py b/xarray/namedarray/core.py
index 9d5b058439e..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_extensions import Self
+ from typing import Self
T_NamedArray = TypeVar("T_NamedArray", bound="_NamedArray[Any]")
T_NamedArrayInteger = TypeVar(
diff --git a/xarray/util/generate_ops.py b/xarray/util/generate_ops.py
index aa28c660f68..74fec786afa 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 :/
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