public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Karolina Surma <ksurma@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-zarr] rawhide: Fix compatibility with Python 3.15
Date: Wed, 03 Jun 2026 09:21:16 GMT	[thread overview]
Message-ID: <178047847617.1.9689200784573700628.rpms-python-zarr-bc8e0c79a151@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-06-03  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178047847617.1.9689200784573700628.rpms-python-zarr-bc8e0c79a151@fedoraproject.org \
    --to=ksurma@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox