Hello community, here is the log from the commit of package python-tables for openSUSE:Factory checked in at 2019-02-14 14:36:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tables (Old) and /work/SRC/openSUSE:Factory/.python-tables.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tables" Thu Feb 14 14:36:14 2019 rev:11 rq:674723 version:3.4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tables/python-tables.changes 2018-08-12 20:54:14.545329535 +0200 +++ /work/SRC/openSUSE:Factory/.python-tables.new.28833/python-tables.changes 2019-02-14 14:36:25.887569101 +0100 @@ -1,0 +2,9 @@ +Wed Feb 13 19:21:03 UTC 2019 - Todd R <[email protected]> + +- Add patches for numpy 1.16 compatibility: + * pytables_fix_exception_check.patch + from: https://github.com/PyTables/PyTables/commit/46fa2f07c00613ed6b647b2cf44e388f547fe668 + * pytables_no_unsafe_write.patch + from: https://github.com/PyTables/PyTables/commit/f6b64c942fb91e6c261fa455969a38482c22beeb + +------------------------------------------------------------------- New: ---- pytables_fix_exception_check.patch pytables_no_unsafe_write.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tables.spec ++++++ --- /var/tmp/diff_new_pack.rMghEp/_old 2019-02-14 14:36:26.331568900 +0100 +++ /var/tmp/diff_new_pack.rMghEp/_new 2019-02-14 14:36:26.331568900 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-tables # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -26,6 +26,11 @@ URL: https://github.com/PyTables/PyTables Source0: https://files.pythonhosted.org/packages/source/t/tables/tables-%{version}.tar.gz Patch0: Never-use-the-msse2-flag-explicitly.patch +# PATCH-FIX-UPSTREAM pytables_no_unsafe_write.patch -- Fix for unsafe behavior forbidden in numpy 1.16 +Patch1: pytables_no_unsafe_write.patch +# PATCH-FIX-UPSTREAM pytables_fix_exception_check.patch -- Fix for new exception in numpy 1.16 +Patch2: pytables_fix_exception_check.patch +BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} # Python 3 version needs mock too for some reason BuildRequires: %{python_module mock} @@ -71,6 +76,8 @@ %prep %setup -q -n tables-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" ++++++ pytables_fix_exception_check.patch ++++++ >From 46fa2f07c00613ed6b647b2cf44e388f547fe668 Mon Sep 17 00:00:00 2001 From: Antonio Valentino <[email protected]> Date: Tue, 1 Jan 2019 12:31:34 +0100 Subject: [PATCH] Check for the correct exception types (numpy 1.16 compat) --- tables/tests/test_array.py | 2 +- tables/tests/test_lists.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tables/tests/test_array.py b/tables/tests/test_array.py index b7d6a3f5..563c7662 100644 --- a/tables/tests/test_array.py +++ b/tables/tests/test_array.py @@ -2005,7 +2005,7 @@ def test(self): """Test for creation of non-homogeneous arrays.""" # This checks ticket #12. - self.assertRaises(ValueError, + self.assertRaises((ValueError, TypeError), self.h5file.create_array, '/', 'test', [1, [2, 3]]) self.assertRaises(NoSuchNodeError, self.h5file.remove_node, '/test') diff --git a/tables/tests/test_lists.py b/tables/tests/test_lists.py index 9cf83fec..9e79130a 100644 --- a/tables/tests/test_lists.py +++ b/tables/tests/test_lists.py @@ -144,14 +144,14 @@ def test00_char(self): print('\n', '-=' * 30) print("Running test for %s" % (self.title)) a = self.charList - with self.assertRaises(ValueError): + with self.assertRaises((ValueError, TypeError)): WriteRead(self.h5fname, a) def test01_types(self): """Non supported lists object (numerical types)""" a = self.numericalList - with self.assertRaises(ValueError): + with self.assertRaises((ValueError, TypeError)): WriteRead(self.h5fname, a) ++++++ pytables_no_unsafe_write.patch ++++++ >From f6b64c942fb91e6c261fa455969a38482c22beeb Mon Sep 17 00:00:00 2001 From: Antonio Valentino <[email protected]> Date: Tue, 1 Jan 2019 12:25:43 +0100 Subject: [PATCH] Fix issue with not writeable buffer (numpy 1.16 compat) --- tables/hdf5extension.pyx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tables/hdf5extension.pyx b/tables/hdf5extension.pyx index 6dc32f48..e64d1a1b 100644 --- a/tables/hdf5extension.pyx +++ b/tables/hdf5extension.pyx @@ -111,6 +111,9 @@ from utilsextension cimport malloc_dims, get_native_type, cstr_to_pystr, load_re #------------------------------------------------------------------- +cdef extern from "Python.h": + + object PyByteArray_FromStringAndSize(char *s, Py_ssize_t len) # Functions from HDF5 ARRAY (this is not part of HDF5 HL; it's private) cdef extern from "H5ARRAY.h" nogil: @@ -2141,8 +2144,8 @@ cdef class VLArray(Leaf): # Create a buffer to keep this info. It is important to do a # copy, because we will dispose the buffer memory later on by # calling the H5Dvlen_reclaim. PyBytes_FromStringAndSize does this. - buf = PyBytes_FromStringAndSize(<char *>rdata[i].p, - vllen*self._atomicsize) + buf = PyByteArray_FromStringAndSize(<char *>rdata[i].p, + vllen*self._atomicsize) else: # Case where there is info with zero lentgh buf = None
