diff --git a/adapted-cython3_noexcept.patch b/adapted-cython3_noexcept.patch deleted file mode 100644 index 2f5490e4c34aa7f55d48959d4e282e1889d96b09..0000000000000000000000000000000000000000 --- a/adapted-cython3_noexcept.patch +++ /dev/null @@ -1,277 +0,0 @@ -From 60720ee4d160fc2ae8ed74f98668f486ad862cef Mon Sep 17 00:00:00 2001 -From: Stefan Behnel -Date: Thu, 4 May 2023 09:18:16 +0200 -Subject: [PATCH] Add "noexcept" markers to functions that do not raise - exceptions - ---- - numpy/random/_common.pxd | 40 +++++++++++++++++++-------------------- - numpy/random/_common.pyx | 2 +- - numpy/random/_mt19937.pyx | 8 ++++---- - numpy/random/_pcg64.pyx | 6 +++--- - numpy/random/_philox.pyx | 6 +++--- - numpy/random/_sfc64.pyx | 6 +++--- - 6 files changed, 34 insertions(+), 34 deletions(-) - -diff --git a/numpy/random/_common.pxd b/numpy/random/_common.pxd -index 3eaf39d..5419d63 100644 ---- a/numpy/random/_common.pxd -+++ b/numpy/random/_common.pxd -@@ -39,32 +39,32 @@ cdef extern from "include/aligned_malloc.h": - cdef void *PyArray_calloc_aligned(size_t n, size_t s) - cdef void PyArray_free_aligned(void *p) - --ctypedef void (*random_double_fill)(bitgen_t *state, np.npy_intp count, double* out) nogil --ctypedef double (*random_double_0)(void *state) nogil --ctypedef double (*random_double_1)(void *state, double a) nogil --ctypedef double (*random_double_2)(void *state, double a, double b) nogil --ctypedef double (*random_double_3)(void *state, double a, double b, double c) nogil -+ctypedef void (*random_double_fill)(bitgen_t *state, np.npy_intp count, double* out) noexcept nogil -+ctypedef double (*random_double_0)(void *state) noexcept nogil -+ctypedef double (*random_double_1)(void *state, double a) noexcept nogil -+ctypedef double (*random_double_2)(void *state, double a, double b) noexcept nogil -+ctypedef double (*random_double_3)(void *state, double a, double b, double c) noexcept nogil - --ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) nogil --ctypedef float (*random_float_0)(bitgen_t *state) nogil --ctypedef float (*random_float_1)(bitgen_t *state, float a) nogil -+ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) noexcept nogil -+ctypedef float (*random_float_0)(bitgen_t *state) noexcept nogil -+ctypedef float (*random_float_1)(bitgen_t *state, float a) noexcept nogil - --ctypedef int64_t (*random_uint_0)(void *state) nogil --ctypedef int64_t (*random_uint_d)(void *state, double a) nogil --ctypedef int64_t (*random_uint_dd)(void *state, double a, double b) nogil --ctypedef int64_t (*random_uint_di)(void *state, double a, uint64_t b) nogil --ctypedef int64_t (*random_uint_i)(void *state, int64_t a) nogil --ctypedef int64_t (*random_uint_iii)(void *state, int64_t a, int64_t b, int64_t c) nogil -+ctypedef int64_t (*random_uint_0)(void *state) noexcept nogil -+ctypedef int64_t (*random_uint_d)(void *state, double a) noexcept nogil -+ctypedef int64_t (*random_uint_dd)(void *state, double a, double b) noexcept nogil -+ctypedef int64_t (*random_uint_di)(void *state, double a, uint64_t b) noexcept nogil -+ctypedef int64_t (*random_uint_i)(void *state, int64_t a) noexcept nogil -+ctypedef int64_t (*random_uint_iii)(void *state, int64_t a, int64_t b, int64_t c) noexcept nogil - --ctypedef uint32_t (*random_uint_0_32)(bitgen_t *state) nogil --ctypedef uint32_t (*random_uint_1_i_32)(bitgen_t *state, uint32_t a) nogil -+ctypedef uint32_t (*random_uint_0_32)(bitgen_t *state) noexcept nogil -+ctypedef uint32_t (*random_uint_1_i_32)(bitgen_t *state, uint32_t a) noexcept nogil - --ctypedef int32_t (*random_int_2_i_32)(bitgen_t *state, int32_t a, int32_t b) nogil --ctypedef int64_t (*random_int_2_i)(bitgen_t *state, int64_t a, int64_t b) nogil -+ctypedef int32_t (*random_int_2_i_32)(bitgen_t *state, int32_t a, int32_t b) noexcept nogil -+ctypedef int64_t (*random_int_2_i)(bitgen_t *state, int64_t a, int64_t b) noexcept nogil - --cdef double kahan_sum(double *darr, np.npy_intp n) -+cdef double kahan_sum(double *darr, np.npy_intp n) noexcept - --cdef inline double uint64_to_double(uint64_t rnd) nogil: -+cdef inline double uint64_to_double(uint64_t rnd) noexcept nogil: - return (rnd >> 11) * (1.0 / 9007199254740992.0) - - cdef object double_fill(void *func, bitgen_t *state, object size, object lock, object out) -diff --git a/numpy/random/_common.pyx b/numpy/random/_common.pyx -index 7b6f693..c5e4e32 100644 ---- a/numpy/random/_common.pyx -+++ b/numpy/random/_common.pyx -@@ -171,7 +171,7 @@ cdef object prepare_ctypes(bitgen_t *bitgen): - ctypes.c_void_p(bitgen)) - return _ctypes - --cdef double kahan_sum(double *darr, np.npy_intp n): -+cdef double kahan_sum(double *darr, np.npy_intp n) noexcept: - """ - Parameters - ---------- -diff --git a/numpy/random/_mt19937.pyx b/numpy/random/_mt19937.pyx -index 5a8d52e..8b99125 100644 ---- a/numpy/random/_mt19937.pyx -+++ b/numpy/random/_mt19937.pyx -@@ -28,16 +28,16 @@ cdef extern from "src/mt19937/mt19937.h": - enum: - RK_STATE_LEN - --cdef uint64_t mt19937_uint64(void *st) nogil: -+cdef uint64_t mt19937_uint64(void *st) noexcept nogil: - return mt19937_next64( st) - --cdef uint32_t mt19937_uint32(void *st) nogil: -+cdef uint32_t mt19937_uint32(void *st) noexcept nogil: - return mt19937_next32( st) - --cdef double mt19937_double(void *st) nogil: -+cdef double mt19937_double(void *st) noexcept nogil: - return mt19937_next_double( st) - --cdef uint64_t mt19937_raw(void *st) nogil: -+cdef uint64_t mt19937_raw(void *st) noexcept nogil: - return mt19937_next32( st) - - cdef class MT19937(BitGenerator): -diff --git a/numpy/random/_pcg64.pyx b/numpy/random/_pcg64.pyx -index c0a10a8..dee38c0 100644 ---- a/numpy/random/_pcg64.pyx -+++ b/numpy/random/_pcg64.pyx -@@ -30,13 +30,13 @@ cdef extern from "src/pcg64/pcg64.h": - uint32_t pcg64_cm_next32(pcg64_state *state) nogil - void pcg64_cm_advance(pcg64_state *state, uint64_t *step) - --cdef uint64_t pcg64_uint64(void* st) nogil: -+cdef uint64_t pcg64_uint64(void* st) noexcept nogil: - return pcg64_next64(st) - --cdef uint32_t pcg64_uint32(void *st) nogil: -+cdef uint32_t pcg64_uint32(void *st) noexcept nogil: - return pcg64_next32( st) - --cdef double pcg64_double(void* st) nogil: -+cdef double pcg64_double(void* st) noexcept nogil: - return uint64_to_double(pcg64_next64(st)) - - cdef uint64_t pcg64_cm_uint64(void* st) nogil: -diff --git a/numpy/random/_philox.pyx b/numpy/random/_philox.pyx -index d9a366e..e0c0504 100644 ---- a/numpy/random/_philox.pyx -+++ b/numpy/random/_philox.pyx -@@ -42,13 +42,13 @@ cdef extern from 'src/philox/philox.h': - void philox_advance(uint64_t *step, philox_state *state) - - --cdef uint64_t philox_uint64(void*st) nogil: -+cdef uint64_t philox_uint64(void*st) noexcept nogil: - return philox_next64( st) - --cdef uint32_t philox_uint32(void *st) nogil: -+cdef uint32_t philox_uint32(void *st) noexcept nogil: - return philox_next32( st) - --cdef double philox_double(void*st) nogil: -+cdef double philox_double(void*st) noexcept nogil: - return uint64_to_double(philox_next64( st)) - - cdef class Philox(BitGenerator): -diff --git a/numpy/random/_sfc64.pyx b/numpy/random/_sfc64.pyx -index 1daee34..419045c 100644 ---- a/numpy/random/_sfc64.pyx -+++ b/numpy/random/_sfc64.pyx -@@ -21,13 +21,13 @@ cdef extern from "src/sfc64/sfc64.h": - void sfc64_set_state(sfc64_state *state, uint64_t *state_arr, int has_uint32, uint32_t uinteger) - - --cdef uint64_t sfc64_uint64(void* st) nogil: -+cdef uint64_t sfc64_uint64(void* st) noexcept nogil: - return sfc64_next64(st) - --cdef uint32_t sfc64_uint32(void *st) nogil: -+cdef uint32_t sfc64_uint32(void *st) noexcept nogil: - return sfc64_next32( st) - --cdef double sfc64_double(void* st) nogil: -+cdef double sfc64_double(void* st) noexcept nogil: - return uint64_to_double(sfc64_next64(st)) - - --- -2.40.1 - -From 910aff8c5827e13a7b8bb32e22604cf5e35943fc Mon Sep 17 00:00:00 2001 -From: Thomas A Caswell -Date: Sat, 13 May 2023 21:33:45 -0400 -Subject: [PATCH] MNT: compatibility with cython3 - -This is fallout from https://github.com/cython/cython/pull/5386 ---- - numpy/random/_pcg64.pyx | 11 +++++------ - numpy/random/_philox.pyx | 4 ++-- - 2 files changed, 7 insertions(+), 8 deletions(-) - -diff --git a/numpy/random/_pcg64.pyx b/numpy/random/_pcg64.pyx -index dee38c0..f7891aa 100644 ---- a/numpy/random/_pcg64.pyx -+++ b/numpy/random/_pcg64.pyx -@@ -26,8 +26,8 @@ cdef extern from "src/pcg64/pcg64.h": - void pcg64_get_state(pcg64_state *state, uint64_t *state_arr, int *has_uint32, uint32_t *uinteger) - void pcg64_set_state(pcg64_state *state, uint64_t *state_arr, int has_uint32, uint32_t uinteger) - -- uint64_t pcg64_cm_next64(pcg64_state *state) nogil -- uint32_t pcg64_cm_next32(pcg64_state *state) nogil -+ uint64_t pcg64_cm_next64(pcg64_state *state) noexcept nogil -+ uint32_t pcg64_cm_next32(pcg64_state *state) noexcept nogil - void pcg64_cm_advance(pcg64_state *state, uint64_t *step) - - cdef uint64_t pcg64_uint64(void* st) noexcept nogil: -@@ -39,13 +39,13 @@ cdef uint32_t pcg64_uint32(void *st) noexcept nogil: - cdef double pcg64_double(void* st) noexcept nogil: - return uint64_to_double(pcg64_next64(st)) - --cdef uint64_t pcg64_cm_uint64(void* st) nogil: -+cdef uint64_t pcg64_cm_uint64(void* st) noexcept nogil: - return pcg64_cm_next64(st) - --cdef uint32_t pcg64_cm_uint32(void *st) nogil: -+cdef uint32_t pcg64_cm_uint32(void *st) noexcept nogil: - return pcg64_cm_next32( st) - --cdef double pcg64_cm_double(void* st) nogil: -+cdef double pcg64_cm_double(void* st) noexcept nogil: - return uint64_to_double(pcg64_cm_next64(st)) - - cdef class PCG64(BitGenerator): -@@ -515,4 +515,3 @@ cdef class PCG64DXSM(BitGenerator): - pcg64_cm_advance(&self.rng_state, np.PyArray_DATA(d)) - self._reset_state_variables() - return self -- -diff --git a/numpy/random/_philox.pyx b/numpy/random/_philox.pyx -index e0c0504..e535346 100644 ---- a/numpy/random/_philox.pyx -+++ b/numpy/random/_philox.pyx -@@ -36,8 +36,8 @@ cdef extern from 'src/philox/philox.h': - - ctypedef s_philox_state philox_state - -- uint64_t philox_next64(philox_state *state) nogil -- uint32_t philox_next32(philox_state *state) nogil -+ uint64_t philox_next64(philox_state *state) noexcept nogil -+ uint32_t philox_next32(philox_state *state) noexcept nogil - void philox_jump(philox_state *state) - void philox_advance(uint64_t *step, philox_state *state) - --- -2.40.1 - -From 83d7c201d7ad01fcacb8a3a8da3206f77a01f274 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Mon, 31 Jul 2023 11:46:23 +0200 -Subject: [PATCH] Unpin Cython to allow 3 - ---- - pyproject.toml | 2 +- - test_requirements.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 60e7f58..557ae21 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -3,7 +3,7 @@ - requires = [ - "setuptools==59.2.0", - "wheel==0.37.0", -- "Cython>=0.29.30,<3.0", -+ "Cython>=0.29.34", - ] - - -diff --git a/test_requirements.txt b/test_requirements.txt -index 67b6a48..a065e99 100644 ---- a/test_requirements.txt -+++ b/test_requirements.txt -@@ -1,4 +1,4 @@ --cython>=0.29.30,<3.0 -+cython>=0.29.34 - wheel==0.37.0 - setuptools==59.2.0 - hypothesis==6.24.1 --- -2.40.1 diff --git a/numpy-1.24.3.tar.gz b/numpy-1.26.4.tar.gz similarity index 49% rename from numpy-1.24.3.tar.gz rename to numpy-1.26.4.tar.gz index ecc053723d19e7261ebff205d7b7b78a44653f88..386a50839432501d5dc2f4e861367f01c0130f8f 100644 Binary files a/numpy-1.24.3.tar.gz and b/numpy-1.26.4.tar.gz differ diff --git a/numpy.spec b/numpy.spec index 5bd86edbc6f1f7234a31548404e4446cad0d7198..e719b54f704aab8dde34e87673a40c30f2052f27 100644 --- a/numpy.spec +++ b/numpy.spec @@ -1,16 +1,14 @@ %global modname numpy Name: numpy -Version: 1.24.3 -Release: 3 +Version: 1.26.4 +Release: 1 Epoch: 1 Summary: A fast multidimensional array facility for Python License: ASL 2.0 URL: http://www.numpy.org/ -Source0: https://files.pythonhosted.org/packages/source/n/numpy/numpy-%{version}.tar.gz - -Patch0: adapted-cython3_noexcept.patch +Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz BuildRequires: openblas-devel BuildRequires: lapack-devel gcc-gfortran @@ -105,12 +103,13 @@ popd &> /dev/null %files -n python3-numpy-f2py %{_bindir}/f2py -%{_bindir}/f2py3 -%{_bindir}/f2py3.* %{python3_sitearch}/%{name}/f2py %exclude %{python3_sitearch}/%{name}/f2py/tests/ %changelog +* Fri Nov 29 2024 zhang_wenyu1 - 1:1.26.4-1 +- Update to 1.26.4 + * Thu Feb 22 2024 shixuantong - 1:1.24.3-3 - Type:bugfix - CVE:NA