diff --git a/0001-Use-unittest.mock-on-Python-3.patch b/0001-Use-unittest.mock-on-Python-3.patch index ea66063..7a4ecfe 100644 --- a/0001-Use-unittest.mock-on-Python-3.patch +++ b/0001-Use-unittest.mock-on-Python-3.patch @@ -1,7 +1,7 @@ From a304cb45af49248a48355ab631485275166c5ae4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 16 Mar 2019 00:02:40 -0400 -Subject: [PATCH 1/8] Use unittest.mock on Python 3. +Subject: [PATCH 1/9] Use unittest.mock on Python 3. Signed-off-by: Elliott Sales de Andrade --- @@ -32,5 +32,5 @@ index 2065049..6bfc989 100644 @classmethod def __getattr__(cls, name): -- -2.20.1 +2.21.0 diff --git a/0002-Unbundle-blosc.patch b/0002-Unbundle-blosc.patch index 744e651..7e50e09 100644 --- a/0002-Unbundle-blosc.patch +++ b/0002-Unbundle-blosc.patch @@ -1,7 +1,7 @@ From 2472ab41e519afc916a463def2ea35085aaa03ca Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 16 Mar 2019 00:17:41 -0400 -Subject: [PATCH 2/8] Unbundle blosc. +Subject: [PATCH 2/9] Unbundle blosc. Signed-off-by: Elliott Sales de Andrade --- @@ -97,5 +97,5 @@ index 448031e..65b9f42 100644 ] -- -2.20.1 +2.21.0 diff --git a/0003-Unbundle-zstd.patch b/0003-Unbundle-zstd.patch index 0acd4bf..ac134df 100644 --- a/0003-Unbundle-zstd.patch +++ b/0003-Unbundle-zstd.patch @@ -1,7 +1,7 @@ From 01934d225411152f48fdff1d3010a5a993d512df Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 16 Mar 2019 00:21:57 -0400 -Subject: [PATCH 3/8] Unbundle zstd. +Subject: [PATCH 3/9] Unbundle zstd. Signed-off-by: Elliott Sales de Andrade --- @@ -50,5 +50,5 @@ index 65b9f42..8be8d80 100644 ] -- -2.20.1 +2.21.0 diff --git a/0004-Unbundle-lz4.patch b/0004-Unbundle-lz4.patch index 98065dd..b1e71e8 100644 --- a/0004-Unbundle-lz4.patch +++ b/0004-Unbundle-lz4.patch @@ -1,7 +1,7 @@ From 9d5e0aba053027eeaa63b32f3bf88aca491e4266 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 16 Mar 2019 00:23:50 -0400 -Subject: [PATCH 4/8] Unbundle lz4. +Subject: [PATCH 4/9] Unbundle lz4. Signed-off-by: Elliott Sales de Andrade --- @@ -43,5 +43,5 @@ index 8be8d80..89237eb 100644 ] -- -2.20.1 +2.21.0 diff --git a/0005-Check-cpuinfo-only-when-needed.patch b/0005-Check-cpuinfo-only-when-needed.patch index 6974111..8580179 100644 --- a/0005-Check-cpuinfo-only-when-needed.patch +++ b/0005-Check-cpuinfo-only-when-needed.patch @@ -1,7 +1,7 @@ From 36c73b2e4a6a6f8dee8d35b66ac8ce6ca72daea5 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 19 Mar 2019 19:07:25 -0400 -Subject: [PATCH 5/8] Check cpuinfo only when needed. +Subject: [PATCH 5/9] Check cpuinfo only when needed. The cpuinfo module does not support s390x and fails to import, but we don't really need it since we've set CFLAGS. Move the import later so @@ -86,5 +86,5 @@ index 89237eb..b107b65 100644 if PY2 and os.name == 'nt': base_compile_args.append('-Dinline=__inline') -- -2.20.1 +2.21.0 diff --git a/0006-Workaround-NumPy-randint-dtype-bug.patch b/0006-Workaround-NumPy-randint-dtype-bug.patch index 9ca459e..093065f 100644 --- a/0006-Workaround-NumPy-randint-dtype-bug.patch +++ b/0006-Workaround-NumPy-randint-dtype-bug.patch @@ -1,7 +1,7 @@ From 3537c88d6da3fdd8ff849b7a3499706fbf5f1c8c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 28 Mar 2019 04:17:29 -0400 -Subject: [PATCH 6/8] Workaround NumPy randint dtype bug. +Subject: [PATCH 6/9] Workaround NumPy randint dtype bug. Previously, it accepted non-native endianness, but simply returned the native order. With 1.16.0, it errors out with a slightly obscure @@ -29,5 +29,5 @@ index 8c71467..883033f 100644 codec = AsType(encode_dtype=' Date: Thu, 28 Mar 2019 04:53:52 -0400 -Subject: [PATCH 7/8] Force test data to be little-endian. +Subject: [PATCH 7/9] Force test data to be little-endian. The stored information in the fixtures says that they should be little-endian. @@ -103,5 +103,5 @@ index e38d7c5..c1b4871 100644 -- -2.20.1 +2.21.0 diff --git a/0008-Skip-Unicode-pickle-tests-on-big-endian-systems.patch b/0008-Skip-Unicode-pickle-tests-on-big-endian-systems.patch index dfdd853..3d252c3 100644 --- a/0008-Skip-Unicode-pickle-tests-on-big-endian-systems.patch +++ b/0008-Skip-Unicode-pickle-tests-on-big-endian-systems.patch @@ -1,7 +1,7 @@ From f2670f83aff8ca19699c446ffde492a350621512 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 1 Apr 2019 03:33:27 -0400 -Subject: [PATCH 8/8] Skip Unicode pickle tests on big-endian systems. +Subject: [PATCH 8/9] Skip Unicode pickle tests on big-endian systems. Signed-off-by: Elliott Sales de Andrade --- @@ -35,5 +35,5 @@ index 9034b10..139051e 100644 def test_backwards_compatibility(): check_backwards_compatibility(Pickle.codec_id, arrays, codecs) -- -2.20.1 +2.21.0 diff --git a/0009-Allow-pickles-when-loading-test-fixture-data.patch b/0009-Allow-pickles-when-loading-test-fixture-data.patch new file mode 100644 index 0000000..3be082c --- /dev/null +++ b/0009-Allow-pickles-when-loading-test-fixture-data.patch @@ -0,0 +1,31 @@ +From df41bb81a4b9b0e76a0a6dbee09c0afef0537d62 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sun, 21 Jul 2019 01:48:02 -0400 +Subject: [PATCH 9/9] Allow pickles when loading test fixture data. + +NumPy disabled loading pickles because it was a security risk, but the +test fixture data is test data we need to load as pickles. + +This is still a security risk though, and just a stopgap solution. + +Signed-off-by: Elliott Sales de Andrade +--- + numcodecs/tests/common.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/numcodecs/tests/common.py b/numcodecs/tests/common.py +index cd18491..448fd44 100644 +--- a/numcodecs/tests/common.py ++++ b/numcodecs/tests/common.py +@@ -187,7 +187,7 @@ def check_backwards_compatibility(codec_id, arrays, codecs, precision=None, pref + + # setup + i = int(arr_fn.split('.')[-2]) +- arr = np.load(arr_fn) ++ arr = np.load(arr_fn, allow_pickle=True) + arr_bytes = arr.tobytes(order='A') + if arr.flags.f_contiguous: + order = 'F' +-- +2.21.0 + diff --git a/python-numcodecs.spec b/python-numcodecs.spec index df8ed47..836387d 100644 --- a/python-numcodecs.spec +++ b/python-numcodecs.spec @@ -2,7 +2,7 @@ Name: python-%{srcname} Version: 0.6.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Buffer compression and transformation for data storage and communication License: MIT @@ -20,6 +20,8 @@ Patch0005: 0005-Check-cpuinfo-only-when-needed.patch Patch0006: 0006-Workaround-NumPy-randint-dtype-bug.patch Patch0007: 0007-Force-test-data-to-be-little-endian.patch Patch0008: 0008-Skip-Unicode-pickle-tests-on-big-endian-systems.patch +# https://github.com/zarr-developers/numcodecs/pull/193 +Patch0009: 0009-Allow-pickles-when-loading-test-fixture-data.patch BuildRequires: gcc BuildRequires: pkgconfig(blosc) @@ -102,6 +104,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} PYTHONDONTWRITEBYTECODE=1 \ %changelog +* Sun Jul 21 2019 Elliott Sales de Andrade - 0.6.3-3 +- Fix build against latest NumPy + * Mon Mar 18 2019 Elliott Sales de Andrade - 0.6.3-2 - Fix broken doc build and test running - Make doc subpackage noarch