[pytables] 01/01: Python 3.5 compatibility

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Fri Aug 14 19:31:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

a_valentino-guest pushed a commit to branch master
in repository pytables.

commit 7ffe4643166c9f1d9485ed90754c364ccf348e46
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Fri Aug 14 18:50:27 2015 +0000

    Python 3.5 compatibility
---
 debian/changelog                                   |  2 ++
 debian/patches/0005-Fix-setitem-return-value.patch | 24 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 27 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 281a00b..c429ab3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ pytables (3.2.1-1) UNRELEASED; urgency=medium
     - drop 0007-Temporay-desable-tests-that-use-the-lz4-conpressor.patch
       no longer needed.
       The issue with lz4 compressor on s39x has been fixed in lz4_0.0~r122-1.
+    - new 0005-Fix-setitem-return-value.patch patch for Python 3.5 compatibility
+      (patch form Barry Warsaw <barry at ubuntu.com>)
   * README.txt has been renamed into README.rst upsream.
      Updated python-pytables*.docs files.
   * New manpage for the pttree utility
diff --git a/debian/patches/0005-Fix-setitem-return-value.patch b/debian/patches/0005-Fix-setitem-return-value.patch
new file mode 100644
index 0000000..5d73cc0
--- /dev/null
+++ b/debian/patches/0005-Fix-setitem-return-value.patch
@@ -0,0 +1,24 @@
+Description: Clear the exception set by PyArray_SETITEM() before raising a
+ TypeError.  Without this, the test suite will raise a SystemError.
+Author: Barry Warsaw <barry at ubuntu.com>
+Bug: https://github.com/PyTables/PyTables/issues/486
+
+--- a/tables/tableextension.pyx
++++ b/tables/tableextension.pyx
+@@ -40,7 +40,7 @@
+
+ # numpy functions & objects
+ from hdf5extension cimport Leaf
+-from cpython cimport PY_MAJOR_VERSION
++from cpython cimport PY_MAJOR_VERSION, PyErr_Clear
+ from libc.stdio cimport snprintf
+ from libc.stdlib cimport malloc, free
+ from libc.string cimport memcpy, strdup, strcmp, strlen
+@@ -1596,6 +1596,7 @@
+       if field.ndim == 1:
+         ret = PyArray_SETITEM(field, field.data + offset * self._stride, value)
+         if ret < 0:
++          PyErr_Clear()
+           raise TypeError
+       ##### End of optimization for scalar values
+       else:
diff --git a/debian/patches/series b/debian/patches/series
index 5900800..2c304df 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0002-Use-system-compression-libs.patch
 0003-Never-use-the-msse2-flag-explicitly.patch
 0004-Do-not-fetch-icons-for-external-web-sites.patch
+0005-Fix-setitem-return-value.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytables.git



More information about the debian-science-commits mailing list