Apply patch for NumPy 2.x test failure

It appears to be a cosmetic issue rather than a real failure.
This commit is contained in:
Sandro 2024-12-25 13:57:51 +01:00
commit ba2dba1357
No known key found for this signature in database
GPG key ID: 68D0FF74FE9F382A
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,24 @@
From 852286242ee46cc16f0a6efef7eb40a5ab3c57d5 Mon Sep 17 00:00:00 2001
From: da-woods <dw-git@d-woods.co.uk>
Date: Wed, 25 Dec 2024 12:12:11 +0000
Subject: [PATCH] Backport ufunc Numpy2 fix
---
tests/run/ufunc.pyx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/run/ufunc.pyx b/tests/run/ufunc.pyx
index f489a07d5e4..b1895ee7903 100644
--- a/tests/run/ufunc.pyx
+++ b/tests/run/ufunc.pyx
@@ -124,8 +124,8 @@ def test_plus_one_twice():
Test a function returning a fused ctuple
>>> plus_one_twice(int_arr_1d) # doctest: +ELLIPSIS
(array([ 1, 5, 9, 13, 17]...), array([ 1, 5, 9, 13, 17]...))
- >>> plus_one_twice(1.j)
- ((1+1j), (1+1j))
+ >>> print(*plus_one_twice(1.j))
+ (1+1j) (1+1j)
2D variant skipped because it's hard to sensible doctest
"""

View file

@ -13,6 +13,10 @@ License: Apache-2.0
URL: http://www.cython.org
Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz
# Backport patch for NumPy 2.x
# https://github.com/cython/cython/issues/6581
Patch: https://github.com/cython/cython/commit/852286242ee46cc16f0a6efef7eb40a5ab3c57d5.patch
BuildRequires: python3-devel
%if %{with tests}