Accepting request 822780 from home:apersaud:branches:devel:languages:python:numeric

update to latest version

OBS-URL: https://build.opensuse.org/request/show/822780
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=70
This commit is contained in:
Tomáš Chvátal 2020-07-25 17:27:28 +00:00 committed by Git OBS Bridge
parent ff0c08796d
commit ab79378cf9
8 changed files with 49 additions and 57 deletions

View File

@ -1,44 +0,0 @@
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index 664bfe6e5..6b94c2787 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -13,7 +13,8 @@ from tempfile import NamedTemporaryFile
from io import BytesIO, StringIO
from datetime import datetime
import locale
-from multiprocessing import Process
+from multiprocessing import Process, Value
+from ctypes import c_bool
import numpy as np
import numpy.ma as ma
@@ -574,16 +575,26 @@ class TestSaveTxt:
@pytest.mark.slow
@requires_memory(free_bytes=7e9)
def test_large_zip(self):
- def check_large_zip():
+ def check_large_zip(memoryerror_raised):
+ memoryerror_raised.value=False
# The test takes at least 6GB of memory, writes a file larger than 4GB
test_data = np.asarray([np.random.rand(np.random.randint(50,100),4)
for i in range(800000)], dtype=object)
with tempdir() as tmpdir:
- np.savez(os.path.join(tmpdir, 'test.npz'), test_data=test_data)
+ try:
+ np.savez(os.path.join(tmpdir, 'test.npz'), test_data=test_data)
+ except MemoryError:
+ memoryerror_raised.value=True
+ raise
# run in a subprocess to ensure memory is released on PyPy, see gh-15775
- p = Process(target=check_large_zip)
+ # Use an object in shared memory to re-raise the MemoryError exception
+ # in our process if needed, see gh-16889
+ memoryerror_raised = Value(c_bool)
+ p = Process(target=check_large_zip, args=(memoryerror_raised,))
p.start()
p.join()
+ if memoryerror_raised.value:
+ raise MemoryError("Child process raised a MemoryError exception")
assert p.exitcode == 0
class LoadTxtBase:

View File

@ -2,7 +2,7 @@ Index: numpy-1.16.2/numpy/lib/tests/test_mixins.py
===================================================================
--- numpy-1.16.2.orig/numpy/lib/tests/test_mixins.py
+++ numpy-1.16.2/numpy/lib/tests/test_mixins.py
@@ -7,6 +7,8 @@ import sys
@@ -4,6 +4,8 @@ import sys
import numpy as np
from numpy.testing import assert_, assert_equal, assert_raises
@ -11,7 +11,7 @@ Index: numpy-1.16.2/numpy/lib/tests/test_mixins.py
# NOTE: This class should be kept as an exact copy of the example from the
# docstring for NDArrayOperatorsMixin.
@@ -199,6 +201,7 @@ class TestNDArrayOperatorsMixin(object):
@@ -193,6 +195,7 @@ class TestNDArrayOperatorsMixin(object):
err_msg = 'failed for operator {}'.format(op)
_assert_equal_type_and_value(expected, actual, err_msg=err_msg)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76766cc80d6128750075378d3bb7812cf146415bd29b588616f72c943c00d598
size 7296082

3
numpy-1.19.1.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b8456987b637232602ceb4d663cb34106f7eb780e247d51a260b84760fd8f491
size 7301568

View File

@ -15,7 +15,7 @@ safely removed.
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -168,7 +168,7 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attr
@@ -186,7 +186,7 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attr
]
# variable attributes tested via "int %s a" % attribute

View File

@ -1,6 +1,6 @@
--- a/numpy/distutils/command/autodist.py
+++ b/numpy/distutils/command/autodist.py
@@ -49,7 +49,7 @@
@@ -50,7 +50,7 @@
"""Return True if the C compiler is GCC 4.x."""
cmd._check_compiler()
body = textwrap.dedent("""
@ -12,7 +12,7 @@
--- a/numpy/distutils/command/install.py
+++ b/numpy/distutils/command/install.py
@@ -69,7 +69,7 @@
@@ -67,7 +67,7 @@
need_rewrite = False
for l in f:
l = l.rstrip()

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Sat Jul 25 15:35:20 UTC 2020 - Arun Persaud <arun@gmx.de>
- specfile:
* update cython version requirement
* updated line number in patches
* removed patch 0001-Re-raise-MemoryError-exception-in-test_large_zips-process, included upstream
- update to version 1.19.1:
* #16649: MAINT, CI: disable Shippable cache
* #16652: MAINT: Replace PyUString_GET_SIZE with
PyUnicode_GetLength.
* #16654: REL: Fix outdated docs link
* #16656: BUG: raise IEEE exception on AIX
* #16672: BUG: Fix bug in AVX complex absolute while processing
array of...
* #16693: TST: Add extra debugging information to CPU features
detection
* #16703: BLD: Add CPU entry for Emscripten / WebAssembly
* #16705: TST: Disable Python 3.9-dev testing.
* #16714: MAINT: Disable use_hugepages in case of ValueError
* #16724: BUG: Fix PyArray_SearchSorted signature.
* #16768: MAINT: Fixes for deprecated functions in scalartypes.c.src
* #16772: MAINT: Remove unneeded call to PyUnicode_READY
* #16776: MAINT: Fix deprecated functions in scalarapi.c
* #16779: BLD, ENH: Add RPATH support for AIX
* #16780: BUG: Fix default fallback in genfromtxt
* #16784: BUG: Added missing return after raising error in methods.c
* #16795: BLD: update cython to 0.29.21
* #16832: MAINT: setuptools 49.2.0 emits a warning, avoid it
* #16872: BUG: Validate output size in bin- and multinomial
* #16875: BLD, MAINT: Pin setuptools
* #16904: DOC: Reconstruct Testing Guideline.
* #16905: TST, BUG: Re-raise MemoryError exception in
test_large_zip's...
* #16906: BUG,DOC: Fix bad MPL kwarg.
* #16916: BUG: Fix string/bytes to complex assignment
* #16922: REL: Prepare for NumPy 1.19.1 release
-------------------------------------------------------------------
Fri Jul 17 11:08:29 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -70,7 +70,7 @@ ExclusiveArch: do_not_build
%endif
%endif
Name: %{package_name}
Version: 1.19.0
Version: 1.19.1
Release: 0
Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause
@ -84,9 +84,7 @@ Patch1: numpy-1.9.0-remove-__declspec.patch
# # PATCH-FIX-SLE fix-py34-tests.patch -- python 3.4 support
Patch3: fix-py34-tests.patch
Patch4: s390x.patch
# PATCH-FIX-UPSTREAM fix-test_large_zip-in-i586.patch -- gh#numpy/numpy#16890
Patch5: 0001-Re-raise-MemoryError-exception-in-test_large_zips-process.patch
BuildRequires: %{python_module Cython >= 0.29.17}
BuildRequires: %{python_module Cython >= 0.29.21}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis >= 5.12.0}
BuildRequires: %{python_module pytest >= 5.4.2}
@ -165,7 +163,6 @@ This package contains files for developing applications using numpy.
# TestF{77,90}ReturnCharacter are broken on all big-endian architectures (#11831)
%patch4 -p1
%endif
%patch5 -p1
# Fix non-executable scripts
sed -i '1s/^#!.*$//' numpy/{compat/setup,random/_examples/cython/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/{setup,bench},matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py
sed -i '1s/^#!.*$//' numpy/random/_examples/cython/*.pyx