Description: Fix test compatibility with numpy 1.24
 np.argsort(stable=True) was introduced in numpy 1.25, which breaks the
 sort_by_keys tests on systems with numpy 1.24. Use kind="stable" instead,
 which is equivalent and supported by older numpy versions.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-01

--- compyle-0.9.1.orig/compyle/tests/test_array.py
+++ compyle-0.9.1/compyle/tests/test_array.py
@@ -281,7 +281,7 @@ def test_sort_by_keys(backend):
     # Then
     if backend in ['opencl', 'cuda']:
         # opencl/cuda backend radix sort is stable
-        order = np.argsort(nparr1, stable=True)
+        order = np.argsort(nparr1, kind="stable")
     else:
         order = np.argsort(nparr1)
     act_result1 = np.take(nparr1, order)
@@ -311,7 +311,7 @@ def test_radix_sort_by_keys():
                                                     use_radix_sort=True)
 
         # Then
-        order = np.argsort(nparr1, stable=True)
+        order = np.argsort(nparr1, kind="stable")
         act_result1 = np.take(nparr1, order)
         act_result2 = np.take(nparr2, order)
         if not np.all(out_array1.get() == act_result1) or not np.all(out_array2.get() == act_result2):
@@ -346,7 +346,7 @@ def test_sort_by_keys_with_output(backen
 
     # Then
     if backend == 'opencl': # opencl backend => radix sort which is stable
-        order = np.argsort(nparr1, stable=True)
+        order = np.argsort(nparr1, kind="stable")
     else:
         order = np.argsort(nparr1)
     act_result1 = np.take(nparr1, order)
