public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-zarr] rawhide: Ignore NumPy 2.x generic unit deprecation warnings in pytest
@ 2026-07-28 20:39 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-07-28 20:39 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-zarr
            Branch : rawhide
            Commit : 0b7ede80fd785091100160a10a9862f55388200b
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-07-28T17:38:47-03:00
            Stats  : +22/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-zarr/c/0b7ede80fd785091100160a10a9862f55388200b?branch=rawhide

            Log:
            Ignore NumPy 2.x generic unit deprecation warnings in pytest

Resolves: rhbz#2504599

---
diff --git a/0005-Ignore-NumPy-2.x-deprecation-warnings-in-pytest.patch b/0005-Ignore-NumPy-2.x-deprecation-warnings-in-pytest.patch
new file mode 100644
index 0000000..6067cbf
--- /dev/null
+++ b/0005-Ignore-NumPy-2.x-deprecation-warnings-in-pytest.patch
@@ -0,0 +1,18 @@
+
+[PATCH] Ignore NumPy 2.x generic unit deprecation warnings in pytest
+
+NumPy 2.x deprecates generic units for datetime64 and timedelta64.
+Since pytest is configured to treat zarr warnings as errors,
+dtype.type("NaT") raises DeprecationWarning which fails the tests.
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -132,6 +132,8 @@ filterwarnings = [
+     "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",
++    "ignore:The 'generic' unit for NumPy timedelta is deprecated.*:DeprecationWarning",
++    "ignore:The 'generic' unit for NumPy datetime is deprecated.*:DeprecationWarning",
+ ]
+ doctest_subpackage_requires = [
+     "zarr/core.py = numpy>=2",

diff --git a/python-zarr.spec b/python-zarr.spec
index e430c2c..f769a99 100644
--- a/python-zarr.spec
+++ b/python-zarr.spec
@@ -19,6 +19,8 @@ Patch:          0002-Fix-compatibility-with-latest-numcodecs.patch
 Patch:          0003-Fix-invalid-escape-sequences-for-Python-3.15.patch
 # Ignore h5py deprecation warning in tests
 Patch:          0004-Ignore-h5py-deprecation-warning.patch
+# Ignore NumPy 2.x generic unit deprecation warnings in pytest
+Patch:          0005-Ignore-NumPy-2.x-deprecation-warnings-in-pytest.patch
 
 BuildArch:      noarch
 
@@ -32,6 +34,7 @@ BuildRequires:  python3dist(h5py)
 #BuildRequires:  python3dist(lmdb)
 BuildRequires:  python3dist(msgpack)
 BuildRequires:  python3dist(pytest)
+BuildRequires:  python3dist(requests)
 
 %description
 Zarr is a Python package providing an implementation of compressed, chunked,
@@ -53,11 +56,11 @@ Summary:        zarr documentation
 BuildArch:      noarch
 
 BuildRequires:  python3dist(numpydoc)
+BuildRequires:  python3dist(pydata-sphinx-theme)
 BuildRequires:  python3dist(sphinx)
 BuildRequires:  python3dist(sphinx-copybutton)
 BuildRequires:  python3dist(sphinx-design)
 BuildRequires:  python3dist(sphinx-issues)
-BuildRequires:  python3dist(pydata-sphinx-theme)
 
 %description -n python-%{srcname}-doc
 Documentation for zarr

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-28 20:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-28 20:39 [rpms/python-zarr] rawhide: Ignore NumPy 2.x generic unit deprecation warnings in pytest Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox