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 2025-12-18 18:36:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ml-dtypes (Old)
and /work/SRC/openSUSE:Factory/.python-ml-dtypes.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ml-dtypes"
Thu Dec 18 18:36:01 2025 rev:3 rq:1323497 version:0.5.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ml-dtypes/python-ml-dtypes.changes
2025-09-22 16:40:29.879474154 +0200
+++
/work/SRC/openSUSE:Factory/.python-ml-dtypes.new.1928/python-ml-dtypes.changes
2025-12-18 18:37:09.279986373 +0100
@@ -1,0 +2,11 @@
+Mon Dec 15 12:14:12 UTC 2025 - Sarah Kriesch <[email protected]>
+
+- update to 0.5.4:
+ * register casts from int2 and int4 to all of the custom float types,
+ except float6_e2m3fn and float8_e8m0fnu
+ * Custom floats may now be constructed from Python integers
+ * Fixed bug in byte-swap operation for custom floats
+ * Wheels now support Python 3.14 free threading on Windows
+ * required for onnx on s390x: bsc#1215337
+
+-------------------------------------------------------------------
Old:
----
ml-dtypes-0.5.3-gh.tar.gz
ml_dtypes-0.5.3.tar.gz
New:
----
ml_dtypes-0.5.4-gh.tar.gz
ml_dtypes-0.5.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ml-dtypes.spec ++++++
--- /var/tmp/diff_new_pack.ONW8eC/_old 2025-12-18 18:37:09.764006707 +0100
+++ /var/tmp/diff_new_pack.ONW8eC/_new 2025-12-18 18:37:09.764006707 +0100
@@ -17,13 +17,13 @@
Name: python-ml-dtypes
-Version: 0.5.3
+Version: 0.5.4
Release: 0
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
+Source1:
https://github.com/jax-ml/ml_dtypes/archive/refs/tags/v%{version}.tar.gz#/ml_dtypes-%{version}-gh.tar.gz
BuildRequires: %{python_module abseil}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel}
++++++ ml_dtypes-0.5.3.tar.gz -> ml_dtypes-0.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/PKG-INFO new/ml_dtypes-0.5.4/PKG-INFO
--- old/ml_dtypes-0.5.3/PKG-INFO 2025-07-29 20:25:34.017506100 +0200
+++ new/ml_dtypes-0.5.4/PKG-INFO 2025-11-17 23:19:07.833685200 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: ml_dtypes
-Version: 0.5.3
+Version: 0.5.4
Summary: ml_dtypes is a stand-alone implementation of several NumPy dtype
extensions used in machine learning.
Author-email: ml_dtypes authors <[email protected]>
License-Expression: Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/__init__.py
new/ml_dtypes-0.5.4/ml_dtypes/__init__.py
--- old/ml_dtypes-0.5.3/ml_dtypes/__init__.py 2025-07-29 20:25:26.000000000
+0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/__init__.py 2025-11-17 23:18:59.000000000
+0100
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.5.3"
+__version__ = "0.5.4"
__all__ = [
"__version__",
"bfloat16",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/_finfo.py
new/ml_dtypes-0.5.4/ml_dtypes/_finfo.py
--- old/ml_dtypes-0.5.3/ml_dtypes/_finfo.py 2025-07-29 20:25:26.000000000
+0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/_finfo.py 2025-11-17 23:18:59.000000000
+0100
@@ -697,7 +697,8 @@
}
_finfo_name_map = {t.name: t for t in _finfo_type_map}
_finfo_cache = {
- t: init_fn.__func__() for t, init_fn in _finfo_type_map.items() #
pytype: disable=attribute-error
+ t: init_fn.__func__() # pytype: disable=attribute-error
+ for t, init_fn in _finfo_type_map.items()
}
def __new__(cls, dtype):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/_src/custom_float.h
new/ml_dtypes-0.5.4/ml_dtypes/_src/custom_float.h
--- old/ml_dtypes-0.5.3/ml_dtypes/_src/custom_float.h 2025-07-29
20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/_src/custom_float.h 2025-11-17
23:18:59.000000000 +0100
@@ -159,6 +159,12 @@
*output = T(f);
return true;
}
+ if (PyArray_IsScalar(arg, Integer)) {
+ int64_t i;
+ PyArray_CastScalarToCtype(arg, &i, PyArray_DescrFromType(NPY_INT64));
+ *output = T(i);
+ return true;
+ }
if (PyArray_IsZeroDim(arg)) {
Safe_PyObjectPtr ref;
PyArrayObject* arr = reinterpret_cast<PyArrayObject*>(arg);
@@ -475,32 +481,41 @@
"Not supported");
char* dst = reinterpret_cast<char*>(dstv);
char* src = reinterpret_cast<char*>(srcv);
- if (!src) {
- return;
- }
- if (swap && sizeof(T) == sizeof(int16_t)) {
- for (npy_intp i = 0; i < n; i++) {
- char* r = dst + dstride * i;
- memcpy(r, src + sstride * i, sizeof(T));
- ByteSwap16(r);
+
+ if (src) {
+ if (swap && sizeof(T) == sizeof(int16_t)) {
+ for (npy_intp i = 0; i < n; i++) {
+ char* r = dst + dstride * i;
+ memcpy(r, src + sstride * i, sizeof(T));
+ ByteSwap16(r);
+ }
+ } else if (dstride == sizeof(T) && sstride == sizeof(T)) {
+ memcpy(dst, src, n * sizeof(T));
+ } else {
+ for (npy_intp i = 0; i < n; i++) {
+ memcpy(dst + dstride * i, src + sstride * i, sizeof(T));
+ }
}
- } else if (dstride == sizeof(T) && sstride == sizeof(T)) {
- memcpy(dst, src, n * sizeof(T));
} else {
- for (npy_intp i = 0; i < n; i++) {
- memcpy(dst + dstride * i, src + sstride * i, sizeof(T));
+ // In-place swap when src is NULL
+ if (swap && sizeof(T) == sizeof(int16_t)) {
+ for (npy_intp i = 0; i < n; i++) {
+ char* r = dst + dstride * i;
+ ByteSwap16(r);
+ }
}
}
}
template <typename T>
void NPyCustomFloat_CopySwap(void* dst, void* src, int swap, void* arr) {
- if (!src) {
- return;
- }
- memcpy(dst, src, sizeof(T));
static_assert(sizeof(T) == sizeof(int16_t) || sizeof(T) == sizeof(int8_t),
"Not supported");
+
+ if (src) {
+ memcpy(dst, src, sizeof(T));
+ }
+
if (swap && sizeof(T) == sizeof(int16_t)) {
ByteSwap16(dst);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/_src/dtypes.cc
new/ml_dtypes-0.5.4/ml_dtypes/_src/dtypes.cc
--- old/ml_dtypes-0.5.3/ml_dtypes/_src/dtypes.cc 2025-07-29
20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/_src/dtypes.cc 2025-11-17
23:18:59.000000000 +0100
@@ -416,6 +416,30 @@
success &= RegisterTwoWayCustomCast<bfloat16, float8_e8m0fnu, float>();
success &= RegisterOneWayCustomCast<int2, int4, int8_t>();
success &= RegisterOneWayCustomCast<uint2, uint4, uint8_t>();
+
+ // Int -> float casts.
+ success &=
+ RegisterTwoWayFloatCasts<int2, bfloat16, float8_e3m4, float8_e4m3,
+ float8_e4m3b11fnuz, float8_e4m3fn,
+ float8_e4m3fnuz, float8_e5m2, float8_e5m2fnuz,
+ float6_e2m3fn, float6_e3m2fn, float4_e2m1fn>();
+ success &=
+ RegisterTwoWayFloatCasts<uint2, bfloat16, float8_e3m4, float8_e4m3,
+ float8_e4m3b11fnuz, float8_e4m3fn,
+ float8_e4m3fnuz, float8_e5m2, float8_e5m2fnuz,
+ float6_e2m3fn, float6_e3m2fn, float4_e2m1fn>();
+ success &=
+ RegisterTwoWayFloatCasts<int4, bfloat16, float8_e3m4, float8_e4m3,
+ float8_e4m3b11fnuz, float8_e4m3fn,
+ float8_e4m3fnuz, float8_e5m2, float8_e5m2fnuz,
+ float6_e3m2fn, float4_e2m1fn>();
+ // int4 -> float6_e2m3fn is not safe and we only register safe casts.
+ success &=
+ RegisterTwoWayFloatCasts<uint4, bfloat16, float8_e3m4, float8_e4m3,
+ float8_e4m3b11fnuz, float8_e4m3fn,
+ float8_e4m3fnuz, float8_e5m2, float8_e5m2fnuz,
+ float6_e3m2fn, float4_e2m1fn>();
+ // uint4 -> float6_e2m3fn is not safe and we only register safe casts.
return success;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/_src/intn_numpy.h
new/ml_dtypes-0.5.4/ml_dtypes/_src/intn_numpy.h
--- old/ml_dtypes-0.5.3/ml_dtypes/_src/intn_numpy.h 2025-07-29
20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/_src/intn_numpy.h 2025-11-17
23:18:59.000000000 +0100
@@ -480,24 +480,25 @@
npy_intp sstride, npy_intp n, int swap, void* arr) {
char* dst = reinterpret_cast<char*>(dstv);
char* src = reinterpret_cast<char*>(srcv);
- if (!src) {
- return;
- }
- if (dstride == sizeof(T) && sstride == sizeof(T)) {
- memcpy(dst, src, n * sizeof(T));
- } else {
- for (npy_intp i = 0; i < n; i++) {
- memcpy(dst + dstride * i, src + sstride * i, sizeof(T));
+
+ if (src) {
+ if (dstride == sizeof(T) && sstride == sizeof(T)) {
+ memcpy(dst, src, n * sizeof(T));
+ } else {
+ for (npy_intp i = 0; i < n; i++) {
+ memcpy(dst + dstride * i, src + sstride * i, sizeof(T));
+ }
}
}
+ // Note: No byte swapping needed for 8-bit integer types
}
template <typename T>
void NPyIntN_CopySwap(void* dst, void* src, int swap, void* arr) {
- if (!src) {
- return;
+ if (src) {
+ memcpy(dst, src, sizeof(T));
}
- memcpy(dst, src, sizeof(T));
+ // Note: No byte swapping needed for 8-bit integer types
}
template <typename T>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/include/float8.h
new/ml_dtypes-0.5.4/ml_dtypes/include/float8.h
--- old/ml_dtypes-0.5.3/ml_dtypes/include/float8.h 2025-07-29
20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/include/float8.h 2025-11-17
23:18:59.000000000 +0100
@@ -564,9 +564,12 @@
static inline constexpr const bool is_integer = false;
static inline constexpr const bool is_exact = false;
static inline constexpr const bool has_quiet_NaN = true;
+// has_denorm and has_denorm_loss are deprecated in C++23.
+#if !defined(__cplusplus) || __cplusplus < 202302L
static inline constexpr const std::float_denorm_style has_denorm =
std::denorm_present;
static inline constexpr const bool has_denorm_loss = false;
+#endif
static inline constexpr const std::float_round_style round_style =
std::round_to_nearest;
static inline constexpr const bool is_bounded = true;
@@ -1005,8 +1008,11 @@
public:
// NOLINTBEGIN: these names must match std::numeric_limits.
static inline constexpr const bool is_signed = false;
+// has_denorm and has_denorm_loss are deprecated in C++23.
+#if !defined(__cplusplus) || __cplusplus < 202302L
static inline constexpr const std::float_denorm_style has_denorm =
std::denorm_absent;
+#endif
static inline constexpr const int digits = kMantissaBits + 1;
static inline constexpr const int digits10 = Digits10FromDigits(digits);
static inline constexpr const int max_digits10 =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/include/intn.h
new/ml_dtypes-0.5.4/ml_dtypes/include/intn.h
--- old/ml_dtypes-0.5.3/ml_dtypes/include/intn.h 2025-07-29
20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/include/intn.h 2025-11-17
23:18:59.000000000 +0100
@@ -258,9 +258,11 @@
static inline constexpr const bool has_infinity = false;
static inline constexpr const bool has_quiet_NaN = false;
static inline constexpr const bool has_signaling_NaN = false;
+#if !defined(__cplusplus) || __cplusplus < 202302L
static inline constexpr const std::float_denorm_style has_denorm =
std::denorm_absent;
static inline constexpr const bool has_denorm_loss = false;
+#endif
static inline constexpr const std::float_round_style round_style =
std::round_toward_zero;
static inline constexpr const bool is_iec559 = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes/include/mxfloat.h
new/ml_dtypes-0.5.4/ml_dtypes/include/mxfloat.h
--- old/ml_dtypes-0.5.3/ml_dtypes/include/mxfloat.h 2025-07-29
20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes/include/mxfloat.h 2025-11-17
23:18:59.000000000 +0100
@@ -127,8 +127,10 @@
static constexpr bool has_infinity = false;
static constexpr bool has_quiet_NaN = false;
static constexpr bool has_signaling_NaN = false;
+#if !defined(__cplusplus) || __cplusplus < 202302L
static constexpr std::float_denorm_style has_denorm = std::denorm_present;
static constexpr bool has_denorm_loss = false;
+#endif
static constexpr std::float_round_style round_style = std::round_to_nearest;
static constexpr bool is_iec559 = false;
static constexpr bool is_bounded = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/ml_dtypes.egg-info/PKG-INFO
new/ml_dtypes-0.5.4/ml_dtypes.egg-info/PKG-INFO
--- old/ml_dtypes-0.5.3/ml_dtypes.egg-info/PKG-INFO 2025-07-29
20:25:33.000000000 +0200
+++ new/ml_dtypes-0.5.4/ml_dtypes.egg-info/PKG-INFO 2025-11-17
23:19:07.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: ml_dtypes
-Version: 0.5.3
+Version: 0.5.4
Summary: ml_dtypes is a stand-alone implementation of several NumPy dtype
extensions used in machine learning.
Author-email: ml_dtypes authors <[email protected]>
License-Expression: Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ml_dtypes-0.5.3/pyproject.toml
new/ml_dtypes-0.5.4/pyproject.toml
--- old/ml_dtypes-0.5.3/pyproject.toml 2025-07-29 20:25:26.000000000 +0200
+++ new/ml_dtypes-0.5.4/pyproject.toml 2025-11-17 23:18:59.000000000 +0100
@@ -52,7 +52,7 @@
# We build against the most recent supported NumPy 2.0 release;
# see https://github.com/numpy/numpy/issues/27265
"numpy~=2.0",
- "setuptools~=80.8.0",
+ "setuptools~=80.9.0",
]
build-backend = "setuptools.build_meta"