public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-zarr] rawhide: Fix compatibility with Python 3.15
@ 2026-06-03 9:21 Karolina Surma
0 siblings, 0 replies; only message in thread
From: Karolina Surma @ 2026-06-03 9:21 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-zarr
Branch : rawhide
Commit : bc8e0c79a151c4939a0084665d96fc6c44bb5116
Author : Karolina Surma <ksurma@redhat.com>
Date : 2026-04-24T13:48:45+02:00
Stats : +76/-0 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-zarr/c/bc8e0c79a151c4939a0084665d96fc6c44bb5116?branch=rawhide
Log:
Fix compatibility with Python 3.15
---
diff --git a/0003-Fix-invalid-escape-sequences-for-Python-3.15.patch b/0003-Fix-invalid-escape-sequences-for-Python-3.15.patch
new file mode 100644
index 0000000..a2902e9
--- /dev/null
+++ b/0003-Fix-invalid-escape-sequences-for-Python-3.15.patch
@@ -0,0 +1,38 @@
+From a39eeb113644a6bb37624764934b2b927a0cc575 Mon Sep 17 00:00:00 2001
+From: Karolina Surma <ksurma@redhat.com>
+Date: Fri, 24 Apr 2026 13:22:23 +0200
+Subject: [PATCH] Fix invalid escape sequences for Python 3.15 compatibility
+
+Python 3.15 treats invalid escape sequences as SyntaxErrors rather than
+warnings. The strings in pytestmark contained '\_' which is not a valid
+escape sequence.
+
+Fixed by using raw strings (r-prefix) which is appropriate for regex
+patterns where backslashes should be literal.
+
+Fixes:
+ SyntaxError: "\_" is an invalid escape sequence
+
+Assisted-By: Claude Sonnet 4.5
+---
+ zarr/tests/test_core.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/zarr/tests/test_core.py b/zarr/tests/test_core.py
+index a4e5a5e..3045e71 100644
+--- a/zarr/tests/test_core.py
++++ b/zarr/tests/test_core.py
+@@ -86,8 +86,8 @@ from zarr.types import DIMENSION_SEPARATOR
+ # noinspection PyMethodMayBeStatic
+
+ pytestmark = [
+- pytest.mark.filterwarnings("ignore:Call to deprecated function .* \_cbuffer\_sizes.*"),
+- pytest.mark.filterwarnings("ignore:Call to deprecated function .* \_cbuffer\_metainfo.*"),
++ pytest.mark.filterwarnings(r"ignore:Call to deprecated function .* \_cbuffer\_sizes.*"),
++ pytest.mark.filterwarnings(r"ignore:Call to deprecated function .* \_cbuffer\_metainfo.*"),
+ ]
+
+
+--
+2.53.0
+
diff --git a/0004-Ignore-h5py-deprecation-warning.patch b/0004-Ignore-h5py-deprecation-warning.patch
new file mode 100644
index 0000000..6c2f304
--- /dev/null
+++ b/0004-Ignore-h5py-deprecation-warning.patch
@@ -0,0 +1,34 @@
+From 632f59cfdaabb6e59608c8989f1650497baf4c57 Mon Sep 17 00:00:00 2001
+From: Karolina Surma <ksurma@redhat.com>
+Date: Fri, 24 Apr 2026 13:23:03 +0200
+Subject: [PATCH] Ignore h5py deprecation warning in pytest configuration
+
+h5py now emits a deprecation warning when creating datasets without
+specifying dtype. This warning is treated as an error by pytest,
+causing test failures with Python 3.15.
+
+Added filterwarning to ignore H5pyDeprecationWarning from h5py.
+
+Fixes:
+ H5pyDeprecationWarning: Creating a dataset without passing data or dtype
+
+Assisted-By: Claude Sonnet 4.5
+---
+ pyproject.toml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index ca8dcb5..a167bd4 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -131,6 +131,7 @@ filterwarnings = [
+ "ignore:The .* is deprecated and will be removed in a Zarr-Python version 3*:FutureWarning",
+ "ignore:The experimental Zarr V3 implementation in this version .*:FutureWarning",
+ "ignore:unclosed database in <sqlite3.Connection.*:ResourceWarning",
++ "ignore:Creating a dataset without passing data or dtype is deprecated.*:h5py.h5py_warnings.H5pyDeprecationWarning",
+ ]
+ doctest_subpackage_requires = [
+ "zarr/core.py = numpy>=2",
+--
+2.53.0
+
diff --git a/python-zarr.spec b/python-zarr.spec
index 0142b5f..e430c2c 100644
--- a/python-zarr.spec
+++ b/python-zarr.spec
@@ -15,6 +15,10 @@ Source: %pypi_source %{srcname}
Patch: 0001-Adapt-storage-tests-for-changes-in-fsspec-1819-1679.patch
# Allow the latest numcodecs version.
Patch: 0002-Fix-compatibility-with-latest-numcodecs.patch
+# Fix invalid escape sequences for Python 3.15 compatibility
+Patch: 0003-Fix-invalid-escape-sequences-for-Python-3.15.patch
+# Ignore h5py deprecation warning in tests
+Patch: 0004-Ignore-h5py-deprecation-warning.patch
BuildArch: noarch
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-03 9:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-03 9:21 [rpms/python-zarr] rawhide: Fix compatibility with Python 3.15 Karolina Surma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox