Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/pytables/files: pytables-3.1.1-numpy19-backport.patch
Date: Fri, 31 Oct 2014 12:52:17
Message-Id: 20141031125206.19CD49241@oystercatcher.gentoo.org
1 jlec 14/10/31 12:52:06
2
3 Added: pytables-3.1.1-numpy19-backport.patch
4 Log:
5 dev-python/pytables: Backport fix for numpy-1.9, #527366
6
7 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
8
9 Revision Changes Path
10 1.1 dev-python/pytables/files/pytables-3.1.1-numpy19-backport.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pytables/files/pytables-3.1.1-numpy19-backport.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/pytables/files/pytables-3.1.1-numpy19-backport.patch?rev=1.1&content-type=text/plain
14
15 Index: pytables-3.1.1-numpy19-backport.patch
16 ===================================================================
17 From 854d5798ca9fd78c00e18710de2e93202f675f3e Mon Sep 17 00:00:00 2001
18 From: Antonio Valentino <antonio.valentino@×××××××.it>
19 Date: Sun, 6 Jul 2014 21:21:39 +0200
20 Subject: [PATCH] Fix a compatibility problem with numpy 1.9 (close: #362)
21
22 ---
23 RELEASE_NOTES.txt | 6 ++++++
24 tables/table.py | 6 +++++-
25 2 files changed, 11 insertions(+), 1 deletion(-)
26
27 diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
28 index f219eb3..1da20e2 100644
29 --- a/RELEASE_NOTES.txt
30 +++ b/RELEASE_NOTES.txt
31 @@ -19,6 +19,12 @@ Improvements
32 requiring strict access alignment.
33
34
35 +Bugs fixed
36 +----------
37 +
38 +- Fixed compatibitily problems with numpy 1.9 (closes :issue:`362`)
39 +
40 +
41 Changes from 3.1.0 to 3.1.1
42 ===========================
43
44 diff --git a/tables/table.py b/tables/table.py
45 index 235f599..ffe8fd6 100644
46 --- a/tables/table.py
47 +++ b/tables/table.py
48 @@ -3406,6 +3406,10 @@ def _getindex(self):
49 associated with this column (None if the column is not
50 indexed).""")
51
52 + @lazyattr
53 + def _itemtype(self):
54 + return self.descr._v_dtypes[self.name]
55 +
56 def _getshape(self):
57 return (self.table.nrows,) + self.descr._v_dtypes[self.name].shape
58
59 @@ -3529,7 +3533,7 @@ def __iter__(self):
60 table = self.table
61 itemsize = self.dtype.itemsize
62 nrowsinbuf = table._v_file.params['IO_BUFFER_SIZE'] // itemsize
63 - buf = numpy.empty((nrowsinbuf, ), self.dtype)
64 + buf = numpy.empty((nrowsinbuf, ), self._itemtype)
65 max_row = len(self)
66 for start_row in xrange(0, len(self), nrowsinbuf):
67 end_row = min(start_row + nrowsinbuf, max_row)