30 Commits
f36 ... rawhide

Author SHA1 Message Date
Fedora Release Engineering
0f10e4da66 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 10:31:19 +00:00
Packit
751e38064f Update to 2025.12.0 upstream release
- Resolves: rhbz#2419634

Commit authored by Packit automation (https://packit.dev/)
2025-12-16 01:07:57 -05:00
Packit
196ebc08ba Update to 2025.11.0 upstream release
- Resolves: rhbz#2400395

Commit authored by Packit automation (https://packit.dev/)
2025-11-27 13:38:20 -05:00
Tomáš Hrnčiar
f7571ba9d3 BuildRequire python-pytest-asyncio to fix the build with pytest 8.4.2 2025-11-10 09:35:12 +01:00
David Bold
b402b2518a Add patch and timeout to tests 2025-09-28 01:36:42 +02:00
Python Maint
185ae2fc83 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:46:43 +02:00
Packit
6f9b465990 Update to 2025.9.0 upstream release
- Resolves: rhbz#2371514

Commit authored by Packit automation (https://packit.dev/)
2025-09-15 05:59:27 -04:00
Fedora Release Engineering
8df0d82123 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 11:10:03 +00:00
Packit
d121e78a08 Update to 2025.4.0 upstream release
- Resolves: rhbz#2328431

Commit authored by Packit automation (https://packit.dev/)

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2025-05-15 23:40:54 -04:00
Elliott Sales de Andrade
6e553d61be Fix additional architecture-specific bugs 2025-01-19 06:08:30 -05:00
Fedora Release Engineering
ffa3ac90cb Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 20:49:57 +00:00
Elliott Sales de Andrade
68a87599ce Update to latest version (#2328431)
- Remove doc subpackage; it's been disabled for a while
2025-01-13 22:32:01 -05:00
Elliott Sales de Andrade
c40c2b8108 Add Packit configuration 2025-01-13 22:31:41 -05:00
Elliott Sales de Andrade
7aca2e8d68 Update to latest version (#2245099) 2024-11-11 07:09:04 -05:00
Elliott Sales de Andrade
b4a8abb2fc Fix tests on big-endian systems
Also, remove a redundant skip, as the listed test is skipped by upstream
already.
2024-08-19 01:35:57 -04:00
Elliott Sales de Andrade
4a8ca0c05d Update to latest version (#2245099) 2024-08-18 23:42:52 -04:00
Fedora Release Engineering
28752f8893 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 17:09:28 +00:00
Adam Williamson
f24a6d1c9b Update to latest upstream release, disable a failing test 2024-06-18 01:15:38 -07:00
Gwyn Ciesla
362dcc1ead Python 3.13 rebuild 2024-06-13 08:42:23 -05:00
Fedora Release Engineering
0d92610f0c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 13:04:16 +00:00
Fedora Release Engineering
e61d64d3e4 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 09:05:39 +00:00
Elliott Sales de Andrade
e75d5c9d07 Update to latest version (#2240764) 2023-09-27 04:11:28 -04:00
Elliott Sales de Andrade
3bebaa049c Update to latest version (#2232901) 2023-09-15 02:37:47 -04:00
Elliott Sales de Andrade
ad60aec436 Fix tests with Matplotlib 3.8.0 2023-09-15 02:03:11 -04:00
Elliott Sales de Andrade
dd372c6ddb Update to latest version (#2208416) 2023-07-19 22:05:07 -04:00
Elliott Sales de Andrade
f0dca5ea32 Rebuild for Python 3.12b4 2023-07-19 06:02:04 -04:00
Elliott Sales de Andrade
8294269fad Skip flaky test 2023-05-08 04:49:44 -04:00
Elliott Sales de Andrade
ea961bf619 Update to latest version (#2131120) 2023-05-08 03:02:23 -04:00
Elliott Sales de Andrade
099f6f89e8 Fix sources
[skip changelog]
2023-01-18 20:35:50 -05:00
Elliott Sales de Andrade
72b1741aac Update to latest version (#2131120) 2023-01-18 19:50:22 -05:00
10 changed files with 220 additions and 189 deletions

14
.gitignore vendored
View File

@@ -19,3 +19,17 @@
/xarray-data-dbd07bb91a7112db0fd2f912c146999f9d436b0e.tar.gz
/xarray-2022.6.0.tar.gz
/xarray-data-86974d54ce83a130303fe8caa629e60deb3cb6e5.tar.gz
/xarray-2023.1.0.tar.gz
/xarray-2023.4.2.tar.gz
/xarray-data-7d8290e0be9d2a8f4b4381641f20a97db6eaea3d.tar.gz
/xarray-2023.7.0.tar.gz
/xarray-2023.8.0.tar.gz
/xarray-2023.9.0.tar.gz
/xarray-2024.6.0.tar.gz
/xarray-2024.7.0.tar.gz
/xarray-2024.10.0.tar.gz
/xarray-2025.1.1.tar.gz
/xarray-2025.4.0.tar.gz
/xarray-2025.9.0.tar.gz
/xarray-2025.11.0.tar.gz
/xarray-2025.12.0.tar.gz

18
.packit.yaml Normal file
View File

@@ -0,0 +1,18 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
---
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
rawhide:
fast_forward_merge_into:
- fedora-branched
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-all

View File

@@ -1,40 +0,0 @@
From 338e50f33a7d286f592a64278349f380f108340c Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 15 Mar 2019 22:31:18 -0400
Subject: [PATCH 1/3] DOC: Don't download RGB.byte.tif during build.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
doc/gallery/plot_rasterio.py | 2 +-
doc/gallery/plot_rasterio_rgb.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/gallery/plot_rasterio.py b/doc/gallery/plot_rasterio.py
index 853923a3..bc8b4421 100644
--- a/doc/gallery/plot_rasterio.py
+++ b/doc/gallery/plot_rasterio.py
@@ -23,7 +23,7 @@ from pyproj import Transformer
import xarray as xr
# Read the data
-url = "https://github.com/rasterio/rasterio/raw/master/tests/data/RGB.byte.tif"
+url = "RGB.byte.tif"
da = xr.open_rasterio(url)
# Compute the lon/lat coordinates with pyproj
diff --git a/doc/gallery/plot_rasterio_rgb.py b/doc/gallery/plot_rasterio_rgb.py
index 912224ac..f2a7b2db 100644
--- a/doc/gallery/plot_rasterio_rgb.py
+++ b/doc/gallery/plot_rasterio_rgb.py
@@ -18,7 +18,7 @@ import matplotlib.pyplot as plt
import xarray as xr
# Read the data
-url = "https://github.com/rasterio/rasterio/raw/master/tests/data/RGB.byte.tif"
+url = "RGB.byte.tif"
da = xr.open_rasterio(url)
# The data is in UTM projection. We have to set it manually until
--
2.36.1

View File

@@ -0,0 +1,42 @@
From 260fec7f2a203093cb6626d464e30fab3ec70de7 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 15 Sep 2025 05:49:16 -0400
Subject: [PATCH 1/2] Drop pydap from dependencies
We didn't have it since it wasn't available in Python 3.10+, and it's
not yet pcakaged.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
pyproject.toml | 1 -
xarray/tests/test_backends.py | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 52897064..23d0b8ee 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -38,7 +38,6 @@ 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/tests/test_backends.py b/xarray/tests/test_backends.py
index 5aab1531..89461b0a 100644
--- a/xarray/tests/test_backends.py
+++ b/xarray/tests/test_backends.py
@@ -7457,7 +7457,7 @@ def test_remote_url_backend_auto_detection() -> None:
"https://disc2.gesdisc.eosdis.nasa.gov/dods/TRMM_3B42", # GrADS /dods/
]
- for url in dap_urls:
+ for url in dap_urls[:0]:
engine = guess_engine(url)
assert engine == expected_dap_backend, (
f"URL {url!r} should select {expected_dap_backend!r} but got {engine!r}"
--
2.52.0

View File

@@ -1,33 +0,0 @@
From 09bf051c792f195465c7330b57be204605b88d2c Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 15 Mar 2019 22:48:25 -0400
Subject: [PATCH 2/3] DOC: Skip examples using unpackaged dependencies.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
doc/user-guide/io.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/user-guide/io.rst b/doc/user-guide/io.rst
index beab5fc0..1109e578 100644
--- a/doc/user-guide/io.rst
+++ b/doc/user-guide/io.rst
@@ -857,6 +857,7 @@ installed, xarray can convert a ``DataArray`` into a ``Cube`` using
:py:meth:`DataArray.to_iris`:
.. ipython:: python
+ :verbatim:
da = xr.DataArray(
np.random.rand(4, 5),
@@ -871,6 +872,7 @@ Conversely, we can create a new ``DataArray`` object from a ``Cube`` using
:py:meth:`DataArray.from_iris`:
.. ipython:: python
+ :verbatim:
da_cube = xr.DataArray.from_iris(cube)
da_cube
--
2.36.1

View File

@@ -0,0 +1,117 @@
From 5e5ef99ce6cae2179a2cc89b551b187fb97f35fe Mon Sep 17 00:00:00 2001
From: David Bold <davidsch@fedoraproject.org>
Date: Tue, 25 Nov 2025 19:58:05 -0500
Subject: [PATCH 2/2] Ensure netcdf4 is locked while closing
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
xarray/backends/file_manager.py | 20 +++++++++++++++-----
xarray/backends/locks.py | 3 +++
xarray/backends/netCDF4_.py | 8 +++-----
3 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/xarray/backends/file_manager.py b/xarray/backends/file_manager.py
index f7cd4675..cf85eaf3 100644
--- a/xarray/backends/file_manager.py
+++ b/xarray/backends/file_manager.py
@@ -8,7 +8,7 @@ from collections.abc import Callable, Hashable, Iterator, Mapping, MutableMappin
from contextlib import AbstractContextManager, contextmanager
from typing import Any, Generic, Literal, TypeVar, cast
-from xarray.backends.locks import acquire
+from xarray.backends.locks import NETCDF4_PYTHON_LOCK, acquire
from xarray.backends.lru_cache import LRUCache
from xarray.core import utils
from xarray.core.options import OPTIONS
@@ -89,7 +89,7 @@ class CachingFileManager(FileManager[T_File]):
*args: Any,
mode: Any = _OMIT_MODE,
kwargs: Mapping[str, Any] | None = None,
- lock: Lock | None | Literal[False] = None,
+ lock: Lock | Literal[False] | None = None,
cache: MutableMapping[Any, T_File] | None = None,
manager_id: Hashable | None = None,
ref_counts: dict[Any, int] | None = None,
@@ -448,9 +448,16 @@ def _remove_del_methods():
class DummyFileManager(FileManager[T_File]):
"""FileManager that simply wraps an open file in the FileManager interface."""
- def __init__(self, value: T_File, *, close: Callable[[], None] | None = None):
+ def __init__(
+ self,
+ value: T_File,
+ *,
+ close: Callable[[], None] | None = None,
+ lock: Lock | Literal[False] | None = None,
+ ):
if close is None:
close = value.close
+ self._lock = lock
self._value = value
self._close = close
@@ -464,5 +471,8 @@ class DummyFileManager(FileManager[T_File]):
yield self._value
def close(self, needs_lock: bool = True) -> None:
- del needs_lock # unused
- self._close()
+ if needs_lock and self._lock:
+ with self._lock:
+ self._close()
+ else:
+ self._close()
diff --git a/xarray/backends/locks.py b/xarray/backends/locks.py
index 78444354..e2db5e93 100644
--- a/xarray/backends/locks.py
+++ b/xarray/backends/locks.py
@@ -281,3 +281,6 @@ def ensure_lock(lock: Lock | None | Literal[False]) -> Lock:
if lock is None or lock is False:
return DummyLock()
return lock
+
+
+NETCDF4_PYTHON_LOCK = combine_locks([NETCDFC_LOCK, HDF5_LOCK])
diff --git a/xarray/backends/netCDF4_.py b/xarray/backends/netCDF4_.py
index bb511f9b..5d5d4e74 100644
--- a/xarray/backends/netCDF4_.py
+++ b/xarray/backends/netCDF4_.py
@@ -30,7 +30,7 @@ from xarray.backends.file_manager import (
PickleableFileManager,
)
from xarray.backends.locks import (
- HDF5_LOCK,
+ NETCDF4_PYTHON_LOCK,
NETCDFC_LOCK,
combine_locks,
ensure_lock,
@@ -67,8 +67,6 @@ if TYPE_CHECKING:
# string used by netCDF4.
_endian_lookup = {"=": "native", ">": "big", "<": "little", "|": "native"}
-NETCDF4_PYTHON_LOCK = combine_locks([NETCDFC_LOCK, HDF5_LOCK])
-
class BaseNetCDF4Array(BackendArray):
__slots__ = ("datastore", "dtype", "shape", "variable_name")
@@ -421,7 +419,7 @@ class NetCDF4DataStore(WritableCFDataStore):
"argument is provided"
)
root = manager
- manager = DummyFileManager(root)
+ manager = DummyFileManager(root, lock=NETCDF4_PYTHON_LOCK)
self._manager = manager
self._group = group
@@ -520,7 +518,7 @@ class NetCDF4DataStore(WritableCFDataStore):
)
else:
manager = CachingFileManager(
- netCDF4.Dataset, filename, mode=mode, kwargs=kwargs
+ netCDF4.Dataset, filename, lock=lock, mode=mode, kwargs=kwargs
)
return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
--
2.52.0

View File

@@ -1,39 +0,0 @@
From a0c1d288ae09cbe8055b4531dffe285aa8b549b4 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 16 Mar 2019 02:59:15 -0400
Subject: [PATCH 3/3] DOC: Don't print out conda/pip environment.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
doc/conf.py | 8 --------
1 file changed, 8 deletions(-)
diff --git a/doc/conf.py b/doc/conf.py
index 7e28953b..49bfdaca 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -16,7 +16,6 @@ import datetime
import inspect
import os
import pathlib
-import subprocess
import sys
from contextlib import suppress
from textwrap import dedent, indent
@@ -35,13 +34,6 @@ allowed_failures = set()
print("python exec:", sys.executable)
print("sys.path:", sys.path)
-if "CONDA_DEFAULT_ENV" in os.environ or "conda" in sys.executable:
- print("conda environment:")
- subprocess.run([os.environ.get("CONDA_EXE", "conda"), "list"])
-else:
- print("pip environment:")
- subprocess.run([sys.executable, "-m", "pip", "list"])
-
print(f"xarray: {xarray.__version__}, {xarray.__file__}")
with suppress(ImportError):
--
2.36.1

3
README.packit Normal file
View File

@@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.12.0.post1.dev20+g7d30dac21.

View File

@@ -1,38 +1,32 @@
%global srcname xarray
%global data_commit 86974d54ce83a130303fe8caa629e60deb3cb6e5
%bcond_with docs
Name: python-%{srcname}
Version: 2022.6.0
Version: 2025.12.0
Release: %autorelease
Summary: N-D labeled arrays and datasets in Python
License: ASL 2.0
License: Apache-2.0
URL: https://github.com/pydata/xarray
Source0: %pypi_source %{srcname}
# Data for examples only.
Source1: https://github.com/pydata/xarray-data/archive/%{data_commit}/xarray-data-%{data_commit}.tar.gz
Source2: https://github.com/rasterio/rasterio/raw/1.2.10/tests/data/RGB.byte.tif
# All Fedora specific.
Patch0001: 0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch
Patch0002: 0002-DOC-Skip-examples-using-unpackaged-dependencies.patch
Patch0003: 0003-DOC-Don-t-print-out-conda-pip-environment.patch
Source: %pypi_source %{srcname}
# Fedora specific.
Patch: 0001-Drop-pydap-from-dependencies.patch
# RHBZ#2395128
# https://github.com/pydata/xarray/pull/10788
Patch: 0002-Ensure-netcdf4-is-locked-while-closing.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(bottleneck)
BuildRequires: python3dist(cftime) >= 1.2
BuildRequires: python3dist(dask[array]) >= 2.30
BuildRequires: python3dist(dask[dataframe]) >= 2.30
BuildRequires: python3dist(netcdf4) >= 1.5
BuildRequires: python3dist(pint) >= 0.16
BuildRequires: python3dist(dask[array]) >= 2023.11
BuildRequires: python3dist(dask[dataframe]) >= 2023.11
BuildRequires: python3dist(pint) >= 0.22
BuildRequires: python3dist(pytest) >= 2.7.1
BuildRequires: python3dist(pytest-asyncio)
BuildRequires: python3dist(pytest-xdist)
BuildRequires: python3dist(rasterio) >= 1.1
BuildRequires: python3dist(seaborn) >= 0.11
BuildRequires: python3dist(zarr) >= 2.5
BuildRequires: python3dist(pytest-timeout)
BuildRequires: python3dist(rasterio) >= 1.3
BuildRequires: python3dist(seaborn) >= 0.13
%global _description %{expand: \
Xarray (formerly xray) is an open source project and Python package that
@@ -47,90 +41,47 @@ for advanced analytics and visualization with these data structures.
Xarray was inspired by and borrows heavily from pandas, the popular data
analysis package focused on labelled tabular data. It is particularly
tailored to working with netCDF files, which were the source of xarray's
tailored to working with netCDF files, which were the source of xarrays
data model, and integrates tightly with dask for parallel computing.}
%description %{_description}
%package -n python3-%{srcname}
Summary: %{summary}
%description -n python3-%{srcname} %{_description}
%if %{with docs}
%package -n python-%{srcname}-doc
Summary: xarray documentation
BuildRequires: python3dist(cartopy)
BuildRequires: natural-earth-map-data-110m
BuildRequires: natural-earth-map-data-10m
BuildRequires: python3-ipython-sphinx
BuildRequires: python3dist(jupyter-client)
BuildRequires: python3dist(matplotlib) >= 3.3
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(sphinx-gallery)
BuildRequires: python3dist(sphinx-rtd-theme)
%description -n python-%{srcname}-doc
Documentation for xarray
%endif
%pyproject_extras_subpkg -n python3-%{srcname} io
%prep
%autosetup -n %{srcname}-%{version} -p1
%if %{with docs}
# Provide example datasets for building docs.
tar xf %SOURCE1 --transform='s~^\(%{srcname}-data-%{data_commit}/\)~\1.xarray_tutorial_data/~'
cp -p %SOURCE2 ./doc/gallery/
%endif
%generate_buildrequires
%pyproject_buildrequires -r
%pyproject_buildrequires -x io
%build
%pyproject_wheel
%if %{with docs}
# generate html docs
pushd doc
PYTHONPATH=${PWD}/.. HOME=${PWD}/../%{srcname}-data-%{data_commit} make html
# remove the sphinx-build leftovers
rm -rf _build/html/.{doctrees,buildinfo}
popd
%endif
%install
%pyproject_install
%pyproject_save_files %{srcname}
%pyproject_save_files -l %{srcname}
%check
rm -rf xarray
echo >> pytest.ini # Ignore any command-line arguments from upstream.
pytest_args=(
-n auto
-m "not network"
# this test somehow crashes python interpreter entirely, was xfail upstream till recently
-k 'not test_save_mfdataset_compute_false_roundtrip'
)
%{pytest} -ra "${pytest_args[@]}" --pyargs xarray
%{pytest} -ra "${pytest_args[@]}" --pyargs xarray --timeout 300 --full-trace
%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
%license licenses/*
%doc README.md
%if %{with docs}
%files -n python-%{srcname}-doc
%doc doc/_build/html
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
%endif
%changelog
%autochangelog

View File

@@ -1,3 +1 @@
SHA512 (xarray-2022.6.0.tar.gz) = 415bd84246d6d2b8aebf316ac9ef82ca7afeacce718349b75479c0aa693e2866dfe236e6dcaf41cae68afd7a99408f5027c938e6b7f447f5323e076b804f5165
SHA512 (xarray-data-86974d54ce83a130303fe8caa629e60deb3cb6e5.tar.gz) = c7cddd4de81908110f65fac9df63b68ade0d37b9983b2bf7a6d5021e419d5b7e23e6bee316be4f802a7fbd70952bb5e3eead91d544c8b8bd6ffb2747d3fca64f
SHA512 (RGB.byte.tif) = 34aa1b196f6c5880530d42ec8a25193bc79db803a8427adc9b115373d222b9f4318a04f06c8b37118df7e09d96b9c470ecec543c604af18861f11b786ed6fbfd
SHA512 (xarray-2025.12.0.tar.gz) = 7bbdf756d24a91c4a11c5d38d10dfe520e2cb80ba2beecdbf534fae76c6c6148232f2f072d068daab60146d46c89e12800276ebc1bc4d5228b16dde8f80d9793