Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ml-dtypes for 
openSUSE:Factory checked in at 2026-03-26 21:08:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ml-dtypes (Old)
 and      /work/SRC/openSUSE:Factory/.python-ml-dtypes.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ml-dtypes"

Thu Mar 26 21:08:31 2026 rev:4 rq:1342663 version:0.5.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ml-dtypes/python-ml-dtypes.changes        
2025-12-18 18:37:09.279986373 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-ml-dtypes.new.8177/python-ml-dtypes.changes  
    2026-03-27 06:48:20.583094919 +0100
@@ -1,0 +2,8 @@
+Thu Mar 26 05:15:28 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Change how we unpack this to make sure we're doing so correctly.
+- Add patch support-numpy-2.4.patch:
+  * Support Numpy 2.4 changes.
+- Ship the licenses and the README in the binary packages.
+
+-------------------------------------------------------------------

New:
----
  support-numpy-2.4.patch

----------(New B)----------
  New:- Change how we unpack this to make sure we're doing so correctly.
- Add patch support-numpy-2.4.patch:
  * Support Numpy 2.4 changes.
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ml-dtypes.spec ++++++
--- /var/tmp/diff_new_pack.xCeenG/_old  2026-03-27 06:48:21.091115839 +0100
+++ /var/tmp/diff_new_pack.xCeenG/_new  2026-03-27 06:48:21.091115839 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ml-dtypes
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,13 @@
 Name:           python-ml-dtypes
 Version:        0.5.4
 Release:        0
-Summary:        stand-alone implementation of several NumPy dtype extensions
+Summary:        Stand-alone implementation of several NumPy dtype extensions
 License:        Apache-2.0
 URL:            https://github.com/jax-ml/ml_dtypes
 Source:         
https://files.pythonhosted.org/packages/source/m/ml-dtypes/ml_dtypes-%{version}.tar.gz
 Source1:        
https://github.com/jax-ml/ml_dtypes/archive/refs/tags/v%{version}.tar.gz#/ml_dtypes-%{version}-gh.tar.gz
+# PATCH-FIX-UPSTREAM gh#jax-ml/ml_dtypes#367
+Patch0:         support-numpy-2.4.patch
 BuildRequires:  %{python_module abseil}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module numpy-devel}
@@ -61,19 +63,23 @@
 - `int2`, `int4`, `uint2` and `uint4`: low precision integer types.
 
 %prep
-%autosetup -p1 -a1 -n ml_dtypes-%{version}
+%autosetup -N -n ml_dtypes-%{version}
+tar -zx --strip-components=1 -f %{SOURCE1}
+%autopatch -p1
 
 %build
 %pyproject_wheel
 
 %install
 %pyproject_install
-%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
 
 %check
 %pytest_arch -k "not testFInfo_float8_e8m0fnu"
 
 %files %{python_files}
+%license LICENSE LICENSE.eigen
+%doc README.md
 %{python_sitearch}/ml_dtypes
 %{python_sitearch}/ml_dtypes-%{version}.dist-info
 

++++++ support-numpy-2.4.patch ++++++
>From 04c4dc8b23720d9d92f3cc849ffc387d5798db84 Mon Sep 17 00:00:00 2001
From: Peter Hawkins <[email protected]>
Date: Thu, 12 Mar 2026 05:57:07 -0700
Subject: [PATCH] Fix test cases that test for equality of NaNs of ml_dtypes
 floats under NumPy 2.4.3.

NumPy 2.4.3 changed its criterion for when numpy.testing.assert_array_equal 
will use "equal NaN" semantics. Currently ml_dtypes floats don't appear to be 
numeric types to NumPy, so NaNs no longer compare as equal. This is actually a 
helpful change in the future since once ml_dtypes migrates to NumPy 2's user 
dtype APIs we will be able to declare our types as such.

For now, just cast types to float32 before testing for equality in tests.

PiperOrigin-RevId: 882541951
---
 ml_dtypes/tests/custom_float_test.py | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/ml_dtypes/tests/custom_float_test.py 
b/ml_dtypes/tests/custom_float_test.py
index 33a11592..410fccce 100644
--- a/ml_dtypes/tests/custom_float_test.py
+++ b/ml_dtypes/tests/custom_float_test.py
@@ -900,20 +900,28 @@ def testConformNumpyComplex(self, float_type):
       numpy_assert_allclose(z_np, z_tf, atol=2e-2, float_type=float_type)
 
   def testArange(self, float_type):
+    # TODO(phawkins): remove the casts to float32 once NumPy considers our 
float
+    # types to be numeric types.
     np.testing.assert_equal(
-        np.arange(1, 100, dtype=np.float32).astype(float_type),
-        np.arange(1, 100, dtype=float_type),
+        np.arange(1, 100, dtype=np.float32)
+        .astype(float_type)
+        .astype(np.float32),
+        np.arange(1, 100, dtype=float_type).astype(np.float32),
     )
     if float_type == float8_e8m0fnu:
       raise self.skipTest("Skip negative ranges for E8M0.")
 
     np.testing.assert_equal(
-        np.arange(-6, 6, 2, dtype=np.float32).astype(float_type),
-        np.arange(-6, 6, 2, dtype=float_type),
+        np.arange(-6, 6, 2, dtype=np.float32)
+        .astype(float_type)
+        .astype(np.float32),
+        np.arange(-6, 6, 2, dtype=float_type).astype(np.float32),
     )
     np.testing.assert_equal(
-        np.arange(-0.0, -2.0, -0.5, dtype=np.float32).astype(float_type),
-        np.arange(-0.0, -2.0, -0.5, dtype=float_type),
+        np.arange(-0.0, -2.0, -0.5, dtype=np.float32)
+        .astype(float_type)
+        .astype(np.float32),
+        np.arange(-0.0, -2.0, -0.5, dtype=float_type).astype(np.float32),
     )
 
   @ignore_warning(category=RuntimeWarning, message="invalid value encountered")

Reply via email to