python3Packages.ml-dtypes: include upstream patch for numpy 2.4.3

Numpy 2.4.3 (currently present on staging) changes the float equality
semantics for NaN-equivalence, which breaks ml_dtypes' tests. We
include an upstream commit to fix this:
https://github.com/jax-ml/ml_dtypes/commit/04c4dc8b23720d9d92f3cc849ffc387d5798db84
This commit is contained in:
whispers
2026-04-01 23:18:12 -04:00
parent 887e5eeeba
commit 973d6242fb
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
# build-system
setuptools,
@@ -30,6 +31,15 @@ buildPythonPackage rec {
fetchSubmodules = true;
};
patches = [
# Fix tests for numpy 2.4.3, which changed the way testing assertions
# handle behaviors with NaN equivalence on the custom numeric types.
(fetchpatch2 {
url = "https://github.com/jax-ml/ml_dtypes/commit/04c4dc8b23720d9d92f3cc849ffc387d5798db84.patch?full_index=1";
hash = "sha256-jqqiDYcHq58JxSqtHfXcNWFbMFhvufqafDPHmORe6F0=";
})
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools~=" "setuptools>="