Compare commits
20 Commits
Author | SHA1 | Date |
---|---|---|
Fedora Release Engineering | bca3b09ec1 | |
Gwyn Ciesla | e144ce4bc1 | |
Gwyn Ciesla | 94f8ec0a11 | |
Gwyn Ciesla | 45b83b14c9 | |
Fedora Release Engineering | 483c5c9487 | |
Python Maint | 1b604a85d1 | |
Miro Hrončok | 6135a94619 | |
Gwyn Ciesla | e0999a67ad | |
Miro Hrončok | bd487d7d25 | |
Nikola Forró | 837eabab5c | |
Gwyn Ciesla | c384ae4c92 | |
Gwyn Ciesla | 7706b2b2c1 | |
Gwyn Ciesla | d9d4c7ceaf | |
Fedora Release Engineering | 432691bcac | |
Gwyn Ciesla | a9f53565fc | |
Gwyn Ciesla | 1c6c512485 | |
Nikola Forró | 06a1578991 | |
Gwyn Ciesla | 6479234f82 | |
Gwyn Ciesla | dcf42cdb7a | |
Tomas Orsava | 7ebadbd30e |
|
@ -82,3 +82,9 @@ numpy-1.4.1.tar.gz
|
|||
/numpy-html.zip
|
||||
/numpy-1.19.3.tar.gz
|
||||
/numpy-1.19.4.tar.gz
|
||||
/numpy-1.20.0rc2.tar.gz
|
||||
/numpy-1.20.0.tar.gz
|
||||
/numpy-1.20.1.tar.gz
|
||||
/numpy-1.21.1.tar.gz
|
||||
/numpy-1.21.5.tar.gz
|
||||
/numpy-1.22.0.tar.gz
|
||||
|
|
|
@ -1,135 +0,0 @@
|
|||
From f73d993bcb03701f4e9146005a65eb482689140a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
|
||||
Date: Mon, 26 Oct 2020 18:54:22 +0100
|
||||
Subject: [PATCH] TST: Make test suite work in FIPS (140-2) Mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Tests using MD5 algorithms fail in FIPS Mode because MD5 is not FIPS
|
||||
compliant.
|
||||
|
||||
Mark usages of MD5 in test suite as not being used for security
|
||||
purposes to overcome that.
|
||||
|
||||
Signed-off-by: Nikola Forró <nforro@redhat.com>
|
||||
---
|
||||
numpy/core/tests/test_regression.py | 2 +-
|
||||
numpy/random/tests/test_generator_mt19937.py | 10 +++++-----
|
||||
numpy/random/tests/test_random.py | 4 ++--
|
||||
numpy/random/tests/test_randomstate.py | 6 +++---
|
||||
4 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
|
||||
index 2e731d4fa..4633174d9 100644
|
||||
--- a/numpy/core/tests/test_regression.py
|
||||
+++ b/numpy/core/tests/test_regression.py
|
||||
@@ -1509,7 +1509,7 @@ class TestRegression:
|
||||
from hashlib import md5
|
||||
|
||||
x = np.array([1, 2, 3], dtype=np.dtype('<i4'))
|
||||
- assert_equal(md5(x).hexdigest(), '2a1dd1e1e59d0a384c26951e316cd7e6')
|
||||
+ assert_equal(md5(x, usedforsecurity=False).hexdigest(), '2a1dd1e1e59d0a384c26951e316cd7e6')
|
||||
|
||||
def test_0d_string_scalar(self):
|
||||
# Bug #1436; the following should succeed
|
||||
diff --git a/numpy/random/tests/test_generator_mt19937.py b/numpy/random/tests/test_generator_mt19937.py
|
||||
index 6be7d852b..9b166e3a2 100644
|
||||
--- a/numpy/random/tests/test_generator_mt19937.py
|
||||
+++ b/numpy/random/tests/test_generator_mt19937.py
|
||||
@@ -507,14 +507,14 @@ class TestIntegers:
|
||||
val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
|
||||
dtype=dt).byteswap()
|
||||
|
||||
- res = hashlib.md5(val).hexdigest()
|
||||
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
|
||||
assert_(tgt[np.dtype(dt).name] == res)
|
||||
|
||||
# bools do not depend on endianness
|
||||
random = Generator(MT19937(1234))
|
||||
val = random.integers(0, 2 - endpoint, size=1000, endpoint=endpoint,
|
||||
dtype=bool).view(np.int8)
|
||||
- res = hashlib.md5(val).hexdigest()
|
||||
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
|
||||
assert_(tgt[np.dtype(bool).name] == res)
|
||||
|
||||
def test_repeatability_broadcasting(self, endpoint):
|
||||
@@ -910,7 +910,7 @@ class TestRandomDist:
|
||||
actual = random.choice(10000, 5000, replace=False)
|
||||
if sys.byteorder != 'little':
|
||||
actual = actual.byteswap()
|
||||
- res = hashlib.md5(actual.view(np.int8)).hexdigest()
|
||||
+ res = hashlib.md5(actual.view(np.int8), usedforsecurity=False).hexdigest()
|
||||
assert_(choice_hash == res)
|
||||
|
||||
def test_bytes(self):
|
||||
@@ -2436,7 +2436,7 @@ def test_jumped(config):
|
||||
key = mt19937.state["state"]["key"]
|
||||
if sys.byteorder == 'big':
|
||||
key = key.byteswap()
|
||||
- md5 = hashlib.md5(key)
|
||||
+ md5 = hashlib.md5(key, usedforsecurity=False)
|
||||
assert mt19937.state["state"]["pos"] == config["initial"]["pos"]
|
||||
assert md5.hexdigest() == config["initial"]["key_md5"]
|
||||
|
||||
@@ -2444,7 +2444,7 @@ def test_jumped(config):
|
||||
key = jumped.state["state"]["key"]
|
||||
if sys.byteorder == 'big':
|
||||
key = key.byteswap()
|
||||
- md5 = hashlib.md5(key)
|
||||
+ md5 = hashlib.md5(key, usedforsecurity=False)
|
||||
assert jumped.state["state"]["pos"] == config["jumped"]["pos"]
|
||||
assert md5.hexdigest() == config["jumped"]["key_md5"]
|
||||
|
||||
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
|
||||
index 276b5bc81..e49251af3 100644
|
||||
--- a/numpy/random/tests/test_random.py
|
||||
+++ b/numpy/random/tests/test_random.py
|
||||
@@ -233,13 +233,13 @@ class TestRandint:
|
||||
else:
|
||||
val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
|
||||
|
||||
- res = hashlib.md5(val.view(np.int8)).hexdigest()
|
||||
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
|
||||
assert_(tgt[np.dtype(dt).name] == res)
|
||||
|
||||
# bools do not depend on endianness
|
||||
np.random.seed(1234)
|
||||
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
|
||||
- res = hashlib.md5(val).hexdigest()
|
||||
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
|
||||
assert_(tgt[np.dtype(bool).name] == res)
|
||||
|
||||
def test_int64_uint64_corner_case(self):
|
||||
diff --git a/numpy/random/tests/test_randomstate.py b/numpy/random/tests/test_randomstate.py
|
||||
index 23dbbed6a..aa53d9322 100644
|
||||
--- a/numpy/random/tests/test_randomstate.py
|
||||
+++ b/numpy/random/tests/test_randomstate.py
|
||||
@@ -341,13 +341,13 @@ class TestRandint:
|
||||
else:
|
||||
val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
|
||||
|
||||
- res = hashlib.md5(val.view(np.int8)).hexdigest()
|
||||
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
|
||||
assert_(tgt[np.dtype(dt).name] == res)
|
||||
|
||||
# bools do not depend on endianness
|
||||
random.seed(1234)
|
||||
val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
|
||||
- res = hashlib.md5(val).hexdigest()
|
||||
+ res = hashlib.md5(val, usedforsecurity=False).hexdigest()
|
||||
assert_(tgt[np.dtype(bool).name] == res)
|
||||
|
||||
@pytest.mark.skipif(np.iinfo('l').max < 2**32,
|
||||
@@ -1987,7 +1987,7 @@ def test_integer_repeat(int_func):
|
||||
val = f(*args, size=1000000)
|
||||
if sys.byteorder != 'little':
|
||||
val = val.byteswap()
|
||||
- res = hashlib.md5(val.view(np.int8)).hexdigest()
|
||||
+ res = hashlib.md5(val.view(np.int8), usedforsecurity=False).hexdigest()
|
||||
assert_(res == md5)
|
||||
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
73
numpy.spec
73
numpy.spec
|
@ -1,5 +1,5 @@
|
|||
#uncomment next line for a release candidate or a beta
|
||||
##%global relc rc1
|
||||
#%%global relc rc1
|
||||
|
||||
# Simple way to disable tests
|
||||
%if 0%{?flatpak}
|
||||
|
@ -19,8 +19,8 @@
|
|||
%global modname numpy
|
||||
|
||||
Name: numpy
|
||||
Version: 1.19.4
|
||||
Release: 1%{?dist}
|
||||
Version: 1.22.0
|
||||
Release: 2%{?dist}
|
||||
Epoch: 1
|
||||
Summary: A fast multidimensional array facility for Python
|
||||
|
||||
|
@ -30,8 +30,6 @@ URL: http://www.numpy.org/
|
|||
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: https://numpy.org/doc/1.19/numpy-html.zip
|
||||
|
||||
Patch0: numpy-1.19.2-FIPS.patch
|
||||
|
||||
%description
|
||||
NumPy is a general-purpose array-processing package designed to
|
||||
efficiently manipulate large multi-dimensional arrays of arbitrary
|
||||
|
@ -59,10 +57,10 @@ Obsoletes: numpy < 1:1.10.1-3
|
|||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-Cython
|
||||
BuildRequires: gcc-gfortran gcc
|
||||
BuildRequires: gcc-gfortran gcc gcc-c++
|
||||
BuildRequires: lapack-devel
|
||||
BuildRequires: python3-hypothesis
|
||||
%if %{with tests}
|
||||
BuildRequires: python3-hypothesis
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-test
|
||||
%endif
|
||||
|
@ -146,15 +144,15 @@ mkdir -p %{buildroot}%{_includedir}
|
|||
ln -s %{python3_sitearch}/%{name}/core/include/numpy/ %{buildroot}%{_includedir}/numpy
|
||||
|
||||
|
||||
%check
|
||||
%if %{with tests}
|
||||
%ifarch ppc64le
|
||||
# https://github.com/numpy/numpy/issues/14357
|
||||
python3 runtests.py -- -k 'not test_einsum_sums_cfloat64'
|
||||
%else
|
||||
python3 runtests.py
|
||||
%endif
|
||||
%endif
|
||||
#%check Re-enable when .coveragerc is shipped: https://github.com/numpy/numpy/issues/19617
|
||||
#%if %{with tests}
|
||||
#%ifarch ppc64le
|
||||
## https://github.com/numpy/numpy/issues/14357
|
||||
#python3 runtests.py -- -k 'not test_einsum_sums_cfloat64'
|
||||
#%else
|
||||
#python3 runtests.py
|
||||
#%endif
|
||||
#%endif
|
||||
|
||||
|
||||
%files -n python3-numpy
|
||||
|
@ -181,6 +179,9 @@ python3 runtests.py
|
|||
%{_includedir}/numpy
|
||||
%{python3_sitearch}/%{name}/__init__.pxd
|
||||
%{python3_sitearch}/%{name}/__init__.cython-30.pxd
|
||||
%{python3_sitearch}/%{name}/py.typed
|
||||
%{python3_sitearch}/%{name}/typing/
|
||||
%{python3_sitearch}/%{name}/array_api/
|
||||
|
||||
%files -n python3-numpy-f2py
|
||||
%{_bindir}/f2py
|
||||
|
@ -194,6 +195,46 @@ python3 runtests.py
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.22.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jan 06 2022 Gwyn Ciesla <gwync@protonmail.com> - 1:1.22.0-1
|
||||
- 1.22.0
|
||||
|
||||
* Wed Dec 22 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.21.5-1
|
||||
- 1.21.5
|
||||
|
||||
* Thu Aug 05 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.21.1-1
|
||||
- 1.21.1, disabing tests as they depend on .coveragerc, not shipped.
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.20.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:1.20.1-4
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Fri May 07 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.1-3
|
||||
- Python 3.10 fix.
|
||||
- Xfail TestCond.test_nan.
|
||||
|
||||
* Fri Feb 12 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.1-2
|
||||
- Fix build requirements, hypothesis is a test dependency
|
||||
|
||||
* Mon Feb 08 2021 Gwyn Ciesla <gwync@protonmail.com> 1:1.20.1-1
|
||||
- 1.21.1
|
||||
|
||||
* Mon Feb 01 2021 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.0-1
|
||||
- 1.20.0 final.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.20.0-0.2.rc2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jan 04 2021 Nikola Forró <nforro@redhat.com> - 1:1.20.0-0.1.rc2
|
||||
- Generate the main dispatcher config header into the build dir
|
||||
|
||||
* Mon Dec 28 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.20.0-0.rc2
|
||||
- 1.20.0 rc2
|
||||
|
||||
* Tue Nov 03 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:1.19.4-1
|
||||
- 1.19.4
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1,2 +1,2 @@
|
|||
SHA512 (numpy-1.19.4.tar.gz) = 50529dd1ae64e578c35ecfd19cb3a601b32fccdf88ca2c1161bc13e57e20bbbb58d3ac44e3afa80967c537338246425dfe9d57dd9f04d58346e5be605c529726
|
||||
SHA512 (numpy-1.22.0.tar.gz) = 368b2cf0bee4dd7fb7d6db96d87984ff4235f0286534149cbe6597e9b690bc8a6643b71d067e43b9190a3186325423b84441c1659a6681adf8a03231c60f51bf
|
||||
SHA512 (numpy-html.zip) = 4a421636523424a0703290b6a0ba53b85a9a9e8a6256363e2481f1c02ae278825c09f2f13d39e99f8aae21f57a4978723f3fc690693520f8c3b45a5b4c5a38ab
|
||||
|
|
Loading…
Reference in New Issue