[pytables] 06/11: Removed 0003-disable-extended-float-support.patch

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Fri Feb 21 07:57:41 UTC 2014


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 77a042c1a9394e75176c56fa7f43fedf6e263a85
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sun Jan 19 16:53:40 2014 +0000

    Removed 0003-disable-extended-float-support.patch
    
    It is no longer necessary and also the same (improved) features
    have been implemented upstream.
---
 debian/changelog                                   |   2 +
 .../0003-disable-extended-float-support.patch      | 874 ---------------------
 debian/patches/series                              |   1 -
 3 files changed, 2 insertions(+), 875 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 426b7d4..7a2d57a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ pytables (3.1.0-1) UNRELEASED; urgency=low
   * debian/patches
     - removed 0001-Fix-detection-of-platforms-supporting-blosc.patch
       (applied upstream)
+    - removed 0003-disable-extended-float-support.patch no more
+      necessary
 
  -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 18 Jan 2014 10:56:27 +0000
 
diff --git a/debian/patches/0003-disable-extended-float-support.patch b/debian/patches/0003-disable-extended-float-support.patch
deleted file mode 100644
index 2bc342a..0000000
--- a/debian/patches/0003-disable-extended-float-support.patch
+++ /dev/null
@@ -1,874 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Sun, 1 Sep 2013 17:26:51 +0000
-Subject: disable extended float support
-
-HDF5 has an issue with long double handling when it is compiled
-with gcc 4.8 (see also upstream issue #275
-https://github.com/PyTables/PyTables/issues/275).
----
- tables/atom.py               |  25 +++----
- tables/description.py        |   4 +-
- tables/tests/test_array.py   |  12 ++--
- tables/tests/test_carray.py  |  10 +--
- tables/tests/test_numpy.py   |  16 ++---
- tables/tests/test_tables.py  | 153 ++++++++++++++++++++++---------------------
- tables/tests/test_types.py   |  64 +++++++++---------
- tables/tests/test_vlarray.py |  55 ++++++++++------
- 8 files changed, 181 insertions(+), 158 deletions(-)
-
-diff --git a/tables/atom.py b/tables/atom.py
-index ac7c674..df91929 100644
---- a/tables/atom.py
-+++ b/tables/atom.py
-@@ -669,10 +669,10 @@ def _generate_floating_classes():
-     # numpy >= 1.6
-     if hasattr(numpy, 'float16'):
-         itemsizes.insert(0, 2)
--    if hasattr(numpy, 'float96'):
--        itemsizes.append(12)
--    if hasattr(numpy, 'float128'):
--        itemsizes.append(16)
-+    #if hasattr(numpy, 'float96'):
-+    #    itemsizes.append(12)
-+    #if hasattr(numpy, 'float128'):
-+    #    itemsizes.append(16)
- 
-     for itemsize in itemsizes:
-         newclass = _create_numeric_class(FloatAtom, itemsize)
-@@ -712,12 +712,12 @@ class ComplexAtom(Atom):
-     # registered by hand.
-     all_types.add('complex64')
-     all_types.add('complex128')
--    if hasattr(numpy, 'complex192'):
--        all_types.add('complex192')
--        _isizes.append(24)
--    if hasattr(numpy, 'complex256'):
--        all_types.add('complex256')
--        _isizes.append(32)
-+    #if hasattr(numpy, 'complex192'):
-+    #    all_types.add('complex192')
-+    #    _isizes.append(24)
-+    #if hasattr(numpy, 'complex256'):
-+    #    all_types.add('complex256')
-+    #    _isizes.append(32)
- 
-     def __init__(self, itemsize, shape=(), dflt=_defvalue):
-         if itemsize not in self._isizes:
-@@ -738,7 +738,10 @@ class _ComplexErrorAtom(ComplexAtom):
-             "where N=8 for single precision complex atoms, "
-             "and N=16 for double precision complex atoms")
- Complex32Atom = Complex64Atom = Complex128Atom = _ComplexErrorAtom
--Complex192Atom = Complex256Atom = _ComplexErrorAtom  # XXX check
-+#if hasattr(numpy, 'complex192'):
-+#    Complex192Atom = _ComplexErrorAtom
-+#if hasattr(numpy, 'complex256'):
-+#    Complex256Atom = _ComplexErrorAtom
- 
- 
- class TimeAtom(Atom):
-diff --git a/tables/description.py b/tables/description.py
-index 80b3871..68ed6c2 100644
---- a/tables/description.py
-+++ b/tables/description.py
-@@ -258,9 +258,9 @@ def _generate_col_classes():
-     # Bottom-level complex classes are not in the type map, of course.
-     # We still want the user to get the compatibility warning, though.
-     cprefixes.extend(['Complex32', 'Complex64', 'Complex128'])
--    if hasattr(numpy, 'complex192'):
-+    if hasattr(atom, 'Complex192Atom'):
-         cprefixes.append('Complex192')
--    if hasattr(numpy, 'complex256'):
-+    if hasattr(atom, 'Complex256Atom'):
-         cprefixes.append('Complex256')
- 
-     for cprefix in cprefixes:
-diff --git a/tables/tests/test_array.py b/tables/tests/test_array.py
-index 65e1393..08aa046 100644
---- a/tables/tests/test_array.py
-+++ b/tables/tests/test_array.py
-@@ -399,7 +399,8 @@ class BasicTestCase(unittest.TestCase):
- 
-         for name in ('float16', 'float96', 'float128',
-                      'complex192', 'complex256'):
--            if hasattr(numpy, name):
-+            atomname = name.capitalize() + 'Atom'
-+            if atomname in globals():
-                 typecodes.append(name)
- 
-         for typecode in typecodes:
-@@ -420,7 +421,8 @@ class BasicTestCase(unittest.TestCase):
- 
-         for name in ('float16', 'float96', 'float128',
-                      'complex192', 'complex256'):
--            if hasattr(numpy, name):
-+            atomname = name.capitalize() + 'Atom'
-+            if atomname in globals():
-                 typecodes.append(name)
- 
-         for typecode in typecodes:
-@@ -906,11 +908,11 @@ class GroupsArrayTestCase(unittest.TestCase):
-         # http://projects.scipy.org/scipy/numpy/ticket/290
-         typecodes = ['b', 'B', 'h', 'H', 'i', 'I', 'l', 'L', 'q', 'f', 'd',
-                      'F', 'D']
--        if hasattr(numpy, 'float16'):
-+        if 'Float16Atom' in globals():
-             typecodes.append('e')
--        if hasattr(numpy, 'float96') or hasattr(numpy, 'float128'):
-+        if 'Float96Atom' in globals() or 'Float128Atom' in globals():
-             typecodes.append('g')
--        if hasattr(numpy, 'complex192') or hasattr(numpy, 'complex256'):
-+        if 'Complex192Atom' in globals() or 'Complex256Atom' in globals():
-             typecodes.append('G')
- 
-         for i, typecode in enumerate(typecodes):
-diff --git a/tables/tests/test_carray.py b/tables/tests/test_carray.py
-index 5f7da1a..2fc998d 100644
---- a/tables/tests/test_carray.py
-+++ b/tables/tests/test_carray.py
-@@ -2758,19 +2758,19 @@ def suite():
-         theSuite.addTest(unittest.makeSuite(Int8TestCase))
-         theSuite.addTest(unittest.makeSuite(Int16TestCase))
-         theSuite.addTest(unittest.makeSuite(Int32TestCase))
--        if hasattr(numpy, 'float16'):
-+        if 'Float16Atom' in globals():
-             theSuite.addTest(unittest.makeSuite(Float16TestCase))
-         theSuite.addTest(unittest.makeSuite(Float32TestCase))
-         theSuite.addTest(unittest.makeSuite(Float64TestCase))
--        if hasattr(numpy, 'float96'):
-+        if 'Float96Atom' in globals():
-             theSuite.addTest(unittest.makeSuite(Float96TestCase))
--        if hasattr(numpy, 'float128'):
-+        if 'Float128Atom' in globals():
-             theSuite.addTest(unittest.makeSuite(Float128TestCase))
-         theSuite.addTest(unittest.makeSuite(Complex64TestCase))
-         theSuite.addTest(unittest.makeSuite(Complex128TestCase))
--        if hasattr(numpy, 'complex192'):
-+        if 'Complex192Atom' in globals():
-             theSuite.addTest(unittest.makeSuite(Complex192TestCase))
--        if hasattr(numpy, 'complex256'):
-+        if 'Complex256Atom' in globals():
-             theSuite.addTest(unittest.makeSuite(Complex256TestCase))
-         theSuite.addTest(unittest.makeSuite(ComprTestCase))
-         theSuite.addTest(unittest.makeSuite(OffsetStrideTestCase))
-diff --git a/tables/tests/test_numpy.py b/tables/tests/test_numpy.py
-index f78aeb5..084895a 100644
---- a/tables/tests/test_numpy.py
-+++ b/tables/tests/test_numpy.py
-@@ -24,11 +24,11 @@ else:
-     typecodes += ['B', 'H', 'I', 'L', 'F', 'D']
- typecodes += ['b1']   # boolean
- 
--if 'float16' in typeDict:
-+if 'Float16Atom' in globals():
-     typecodes.append('e')
--if 'float96' in typeDict or 'float128' in typeDict:
-+if 'Float96Atom' in globals() or 'Float128Atom' in globals():
-     typecodes.append('g')
--if 'complex192' in typeDict or 'conplex256' in typeDict:
-+if 'Complex192Atom' in globals() or 'Conplex256Atom' in globals():
-     typecodes.append('G')
- 
- byteorder = {'little': '<', 'big': '>'}[sys.byteorder]
-@@ -404,15 +404,15 @@ class Record(IsDescription):
-     var12 = Float64Col(dflt=1.0)
-     var13 = ComplexCol(itemsize=8, dflt=(1.+0.j))
-     var14 = ComplexCol(itemsize=16, dflt=(1.+0.j))
--    if 'float16' in typeDict:
-+    if 'Float16Col' in globals():
-         var15 = Float16Col(dflt=1.0)
--    if 'float96' in typeDict:
-+    if 'Float96Col' in globals():
-         var16 = Float96Col(dflt=1.0)
--    if 'float128' in typeDict:
-+    if 'Float128Col' in globals():
-         var17 = Float128Col(dflt=1.0)
--    if 'complex196' in typeDict:
-+    if 'Complex196Col' in globals():
-         var18 = ComplexCol(itemsize=24, dflt=(1.+0.j))
--    if 'complex256' in typeDict:
-+    if 'Complex256Col' in globals():
-         var19 = ComplexCol(itemsize=32, dflt=(1.+0.j))
- 
- 
-diff --git a/tables/tests/test_tables.py b/tables/tests/test_tables.py
-index dd911de..2326134 100644
---- a/tables/tests/test_tables.py
-+++ b/tables/tests/test_tables.py
-@@ -35,18 +35,18 @@ class Record(IsDescription):
-         0.+1.j), pos=8)  # Complex single precision
-     var10 = ComplexCol(itemsize=16, dflt=(
-         1.-0.j), pos=9)  # Complex double precision
--    if 'float16' in np.typeDict:
-+    if 'Float16Col' in globals():
-         var11 = Float16Col(dflt=6.4)               # float  (half-precision)
--    if 'float96' in np.typeDict:
-+    if 'Float96Col' in globals():
-         var12 = Float96Col(
-             dflt=6.4)               # float  (extended precision)
--    if 'float128' in np.typeDict:
-+    if 'Float128Col' in globals():
-         var13 = Float128Col(
-             dflt=6.4)              # float  (extended precision)
--    if 'complex192' in np.typeDict:
-+    if 'Complex192Col' in globals():
-         var14 = ComplexCol(itemsize=24, dflt=(
-             1.-0.j))  # Complex double (extended precision)
--    if 'complex256' in np.typeDict:
-+    if 'Complex256Col' in globals():
-         var15 = ComplexCol(itemsize=32, dflt=(
-             1.-0.j))  # Complex double (extended precision)
- 
-@@ -64,19 +64,19 @@ RecordDescriptionDict = {
-     'var10': ComplexCol(itemsize=16, dflt=(1.-0.j), pos=9),  # Complex double precision
- }
- 
--if 'float16' in np.typeDict:
-+if 'Float16Col' in globals():
-     RecordDescriptionDict['var11'] = Float16Col(
-         dflt=6.4)    # float  (half-precision)
--if 'float96' in np.typeDict:
-+if 'Float96Col' in globals():
-     RecordDescriptionDict['var12'] = Float96Col(
-         dflt=6.4)    # float  (extended precision)
--if 'float128' in np.typeDict:
-+if 'Float128Col' in globals():
-     RecordDescriptionDict['var13'] = Float128Col(
-         dflt=6.4)   # float  (extended precision)
--if 'complex192' in np.typeDict:
-+if 'Complex192Col' in globals():
-     RecordDescriptionDict['var14'] = ComplexCol(itemsize=24, dflt=(
-         1.-0.j))  # Complex double (extended precision)
--if 'complex256' in np.typeDict:
-+if 'Complex256Col' in globals():
-     RecordDescriptionDict['var15'] = ComplexCol(itemsize=32, dflt=(
-         1.-0.j))  # Complex double (extended precision)
- 
-@@ -93,15 +93,15 @@ class OldRecord(IsDescription):
-     var8 = Col.from_type("bool", shape=(), dflt=1, pos=7)
-     var9 = ComplexCol(itemsize=8, shape=(), dflt=(0.+1.j), pos=8)
-     var10 = ComplexCol(itemsize=16, shape=(), dflt=(1.-0.j), pos = 9)
--    if 'float16' in np.typeDict:
-+    if 'Float16Col' in globals():
-         var11 = Col.from_type("float16", (), 6.4)
--    if 'float96' in np.typeDict:
-+    if 'Float96Col' in globals():
-         var12 = Col.from_type("float96", (), 6.4)
--    if 'float128' in np.typeDict:
-+    if 'Float128Col' in globals():
-         var13 = Col.from_type("float128", (), 6.4)
--    if 'complex192' in np.typeDict:
-+    if 'Complex192Col' in globals():
-         var14 = ComplexCol(itemsize=24, shape=(), dflt=(1.-0.j))
--    if 'complex256' in np.typeDict:
-+    if 'Complex256Col' in globals():
-         var15 = ComplexCol(itemsize=32, shape=(), dflt=(1.-0.j))
- 
- 
-@@ -164,27 +164,27 @@ class BasicTestCase(common.PyTablesTestCase):
-                 tmplist.append([float(i)+0j, 1 + float(i)*1j])
-             else:
-                 tmplist.append(1 + float(i)*1j)
--            if 'float16' in np.typeDict:
-+            if 'Float16Col' in globals():
-                 if isinstance(row['var11'], np.ndarray):
-                     tmplist.append(np.array((float(i),)*4))
-                 else:
-                     tmplist.append(float(i))
--            if 'float96' in np.typeDict:
-+            if 'Float96Col' in globals():
-                 if isinstance(row['var12'], np.ndarray):
-                     tmplist.append(np.array((float(i),)*4))
-                 else:
-                     tmplist.append(float(i))
--            if 'float128' in np.typeDict:
-+            if 'Float128Col' in globals():
-                 if isinstance(row['var13'], np.ndarray):
-                     tmplist.append(np.array((float(i),)*4))
-                 else:
-                     tmplist.append(float(i))
--            if 'complex192' in np.typeDict:
-+            if 'Complex192Col' in globals():
-                 if isinstance(row['var14'], np.ndarray):
-                     tmplist.append([float(i)+0j, 1 + float(i)*1j])
-                 else:
-                     tmplist.append(1 + float(i)*1j)
--            if 'complex256' in np.typeDict:
-+            if 'Complex256Col' in globals():
-                 if isinstance(row['var15'], np.ndarray):
-                     tmplist.append([float(i)+0j, 1 + float(i)*1j])
-                 else:
-@@ -247,27 +247,27 @@ class BasicTestCase(common.PyTablesTestCase):
-                         row['var5'] = np.array((float(i),)*4)
-                     else:
-                         row['var5'] = float(i)
--                    if 'float16' in np.typeDict:
-+                    if 'Float16Col' in globals():
-                         if isinstance(row['var11'], np.ndarray):
-                             row['var11'] = np.array((float(i),)*4)
-                         else:
-                             row['var11'] = float(i)
--                    if 'float96' in np.typeDict:
-+                    if 'Float96Col' in globals():
-                         if isinstance(row['var12'], np.ndarray):
-                             row['var12'] = np.array((float(i),)*4)
-                         else:
-                             row['var12'] = float(i)
--                    if 'float128' in np.typeDict:
-+                    if 'Float128Col' in globals():
-                         if isinstance(row['var13'], np.ndarray):
-                             row['var13'] = np.array((float(i),)*4)
-                         else:
-                             row['var13'] = float(i)
--                    if 'complex192' in np.typeDict:
-+                    if 'Complex192Col' in globals():
-                         if isinstance(row['var14'], np.ndarray):
-                             row['var14'] = [float(i)+0j, 1 + float(i)*1j]
-                         else:
-                             row['var14'] = 1 + float(i)*1j
--                    if 'complex256' in np.typeDict:
-+                    if 'Complex256Col' in globals():
-                         if isinstance(row['var15'], np.ndarray):
-                             row['var15'] = [float(i)+0j, 1 + float(i)*1j]
-                         else:
-@@ -321,7 +321,8 @@ class BasicTestCase(common.PyTablesTestCase):
-         expectedNames = ['var%d' % n for n in range(1, fix_n_column + 1)]
-         types = ("float16", "float96", "float128", "complex192", "complex256")
-         for n, typename in enumerate(types, fix_n_column + 1):
--            if typename in np.typeDict:
-+            name = typename.capitalize() + 'Col'
-+            if name in globals():
-                 expectedNames.append('var%d' % n)
- 
-         self.assertEqual(expectedNames, list(tbl.colnames))
-@@ -774,27 +775,27 @@ class BasicTestCase(common.PyTablesTestCase):
-                 row['var5'] = np.array((float(i),)*4)
-             else:
-                 row['var5'] = float(i)
--            if 'float16' in np.typeDict:
-+            if 'Float16Col' in globals():
-                 if isinstance(row['var11'], np.ndarray):
-                     row['var11'] = np.array((float(i),)*4)
-                 else:
-                     row['var11'] = float(i)
--            if 'float96' in np.typeDict:
-+            if 'Float96Col' in globals():
-                 if isinstance(row['var12'], np.ndarray):
-                     row['var12'] = np.array((float(i),)*4)
-                 else:
-                     row['var12'] = float(i)
--            if 'float128' in np.typeDict:
-+            if 'Float128Col' in globals():
-                 if isinstance(row['var13'], np.ndarray):
-                     row['var13'] = np.array((float(i),)*4)
-                 else:
-                     row['var13'] = float(i)
--            if 'complex192' in np.typeDict:
-+            if 'Complex192Col' in globals():
-                 if isinstance(row['var14'], np.ndarray):
-                     row['var14'] = [float(i)+0j, 1 + float(i)*1j]
-                 else:
-                     row['var14'] = 1 + float(i)*1j
--            if 'complex256' in np.typeDict:
-+            if 'Complex256Col' in globals():
-                 if isinstance(row['var15'], np.ndarray):
-                     row['var15'] = [float(i)+0j, 1 + float(i)*1j]
-                 else:
-@@ -872,27 +873,27 @@ class BasicTestCase(common.PyTablesTestCase):
-                     row['var5'] = np.array((float(i),)*4)
-                 else:
-                     row['var5'] = float(i)
--                if 'float16' in np.typeDict:
-+                if 'Float16Col' in globals():
-                     if isinstance(row['var11'], np.ndarray):
-                         row['var11'] = np.array((float(i),)*4)
-                     else:
-                         row['var11'] = float(i)
--                if 'float96' in np.typeDict:
-+                if 'Float96Col' in globals():
-                     if isinstance(row['var12'], np.ndarray):
-                         row['var12'] = np.array((float(i),)*4)
-                     else:
-                         row['var12'] = float(i)
--                if 'float128' in np.typeDict:
-+                if 'Float128Col' in globals():
-                     if isinstance(row['var13'], np.ndarray):
-                         row['var13'] = np.array((float(i),)*4)
-                     else:
-                         row['var13'] = float(i)
--                if 'complex192' in np.typeDict:
-+                if 'Complex192Col' in globals():
-                     if isinstance(row['var14'], np.ndarray):
-                         row['var14'] = [float(i)+0j, 1 + float(i)*1j]
-                     else:
-                         row['var14'] = 1 + float(i)*1j
--                if 'complex256' in np.typeDict:
-+                if 'Complex256Col' in globals():
-                     if isinstance(row['var15'], np.ndarray):
-                         row['var15'] = [float(i)+0j, 1 + float(i)*1j]
-                     else:
-@@ -973,27 +974,27 @@ class BasicTestCase(common.PyTablesTestCase):
-                 row['var5'] = np.array((float(i),)*4)
-             else:
-                 row['var5'] = float(i)
--            if 'float16' in np.typeDict:
-+            if 'Float16Col' in globals():
-                 if isinstance(row['var11'], np.ndarray):
-                     row['var11'] = np.array((float(i),)*4)
-                 else:
-                     row['var11'] = float(i)
--            if 'float96' in np.typeDict:
-+            if 'Float96Col' in globals():
-                 if isinstance(row['var12'], np.ndarray):
-                     row['var12'] = np.array((float(i),)*4)
-                 else:
-                     row['var12'] = float(i)
--            if 'float128' in np.typeDict:
-+            if 'Float128Col' in globals():
-                 if isinstance(row['var13'], np.ndarray):
-                     row['var13'] = np.array((float(i),)*4)
-                 else:
-                     row['var13'] = float(i)
--            if 'complex192' in np.typeDict:
-+            if 'Complex192Col' in globals():
-                 if isinstance(row['var14'], np.ndarray):
-                     row['var14'] = [float(i)+0j, 1 + float(i)*1j]
-                 else:
-                     row['var14'] = 1 + float(i)*1j
--            if 'complex256' in np.typeDict:
-+            if 'Complex256Col' in globals():
-                 if isinstance(row['var15'], np.ndarray):
-                     row['var15'] = [float(i)+0j, 1 + float(i)*1j]
-                 else:
-@@ -1410,27 +1411,27 @@ class BasicTestCase(common.PyTablesTestCase):
-                 row['var5'] = np.array((float(i),)*4)
-             else:
-                 row['var5'] = float(i)
--            if 'float16' in np.typeDict:
-+            if 'Float16Col' in globals():
-                 if isinstance(row['var11'], np.ndarray):
-                     row['var11'] = np.array((float(i),)*4)
-                 else:
-                     row['var11'] = float(i)
--            if 'float96' in np.typeDict:
-+            if 'Float96Col' in globals():
-                 if isinstance(row['var12'], np.ndarray):
-                     row['var12'] = np.array((float(i),)*4)
-                 else:
-                     row['var12'] = float(i)
--            if 'float128' in np.typeDict:
-+            if 'Float128Col' in globals():
-                 if isinstance(row['var13'], np.ndarray):
-                     row['var13'] = np.array((float(i),)*4)
-                 else:
-                     row['var13'] = float(i)
--            if 'complex192' in np.typeDict:
-+            if 'Complex192Col' in globals():
-                 if isinstance(row['var14'], np.ndarray):
-                     row['var14'] = [float(i)+0j, 1 + float(i)*1j]
-                 else:
-                     row['var14'] = 1 + float(i)*1j
--            if 'complex256' in np.typeDict:
-+            if 'Complex256Col' in globals():
-                 if isinstance(row['var15'], np.ndarray):
-                     row['var15'] = [float(i)+0j, 1 + float(i)*1j]
-                 else:
-@@ -1527,19 +1528,19 @@ class NumPyDTWriteTestCase(BasicTestCase):
-     formats = "a4,i4,i2,2f8,f4,i2,a1,b1,c8,c16".split(',')
-     names = 'var1,var2,var3,var4,var5,var6,var7,var8,var9,var10'.split(',')
- 
--    if 'float16' in np.typeDict:
-+    if 'Float16Col' in globals():
-         formats.append('f2')
-         names.append('var11')
--    if 'float96' in np.typeDict:
-+    if 'Float96Col' in globals():
-         formats.append('f12')
-         names.append('var12')
--    if 'float128' in np.typeDict:
-+    if 'Float128Col' in globals():
-         formats.append('f16')
-         names.append('var13')
--    if 'complex192' in np.typeDict:
-+    if 'Complex192Col' in globals():
-         formats.append('c24')
-         names.append('var14')
--    if 'complex256' in np.typeDict:
-+    if 'Complex256Col' in globals():
-         formats.append('c32')
-         names.append('var15')
- 
-@@ -1552,19 +1553,19 @@ class RecArrayOneWriteTestCase(BasicTestCase):
-     formats = "a4,i4,i2,2f8,f4,i2,a1,b1,c8,c16".split(',')
-     names = 'var1,var2,var3,var4,var5,var6,var7,var8,var9,var10'.split(',')
- 
--    if 'float16' in np.typeDict:
-+    if 'Float16Col' in globals():
-         formats.append('f2')
-         names.append('var11')
--    if 'float96' in np.typeDict:
-+    if 'Float96Col' in globals():
-         formats.append('f12')
-         names.append('var12')
--    if 'float128' in np.typeDict:
-+    if 'Float128Col' in globals():
-         formats.append('f16')
-         names.append('var13')
--    if 'complex192' in np.typeDict:
-+    if 'Complex192Col' in globals():
-         formats.append('c24')
-         names.append('var14')
--    if 'complex256' in np.typeDict:
-+    if 'Complex256Col' in globals():
-         formats.append('c32')
-         names.append('var15')
- 
-@@ -1579,19 +1580,19 @@ class RecArrayTwoWriteTestCase(BasicTestCase):
-     formats = "a4,i4,i2,2f8,f4,i2,a1,b1,c8,c16".split(',')
-     names = 'var1,var2,var3,var4,var5,var6,var7,var8,var9,var10'.split(',')
- 
--    if 'float16' in np.typeDict:
-+    if 'Float16Col' in globals():
-         formats.append('f2')
-         names.append('var11')
--    if 'float96' in np.typeDict:
-+    if 'Float96Col' in globals():
-         formats.append('f12')
-         names.append('var12')
--    if 'float128' in np.typeDict:
-+    if 'Float128Col' in globals():
-         formats.append('f16')
-         names.append('var13')
--    if 'complex192' in np.typeDict:
-+    if 'Complex192Col' in globals():
-         formats.append('c24')
-         names.append('var14')
--    if 'complex256' in np.typeDict:
-+    if 'Complex256Col' in globals():
-         formats.append('c32')
-         names.append('var15')
- 
-@@ -1606,19 +1607,19 @@ class RecArrayThreeWriteTestCase(BasicTestCase):
-     formats = "a4,i4,i2,2f8,f4,i2,a1,b1,c8,c16".split(',')
-     names = 'var1,var2,var3,var4,var5,var6,var7,var8,var9,var10'.split(',')
- 
--    if 'float16' in np.typeDict:
-+    if 'Float16Col' in globals():
-         formats.append('f2')
-         names.append('var11')
--    if 'float96' in np.typeDict:
-+    if 'Float96Col' in globals():
-         formats.append('f12')
-         names.append('var12')
--    if 'float128' in np.typeDict:
-+    if 'Float128Col' in globals():
-         formats.append('f16')
-         names.append('var13')
--    if 'complex192' in np.typeDict:
-+    if 'Complex192Col' in globals():
-         formats.append('c24')
-         names.append('var14')
--    if 'complex256' in np.typeDict:
-+    if 'Complex256Col' in globals():
-         formats.append('c32')
-         names.append('var15')
- 
-@@ -5351,19 +5352,19 @@ class DefaultValues(unittest.TestCase):
-         values = [b"abcd", 1, 2, 3.1, 4.2, 5, "e", 1, 1j, 1 + 0j]
-         formats = 'a4,i4,i2,f8,f4,u2,a1,b1,c8,c16'.split(',')
- 
--        if 'float16' in np.typeDict:
-+        if 'Float16Col' in globals():
-             values.append(6.4)
-             formats.append('f2')
--        if 'float96' in np.typeDict:
-+        if 'Float96Col' in globals():
-             values.append(6.4)
-             formats.append('f12')
--        if 'float128' in np.typeDict:
-+        if 'Float128Col' in globals():
-             values.append(6.4)
-             formats.append('f16')
--        if 'complex192' in np.typeDict:
-+        if 'Complex192Col' in globals():
-             values.append(1.-0.j)
-             formats.append('c24')
--        if 'complex256' in np.typeDict:
-+        if 'Complex256Col' in globals():
-             values.append(1.-0.j)
-             formats.append('c32')
- 
-@@ -5430,19 +5431,19 @@ class DefaultValues(unittest.TestCase):
-         values = [b"abcd", 1, 2, 3.1, 4.2, 5, "e", 1, 1j, 1 + 0j]
-         formats = 'a4,i4,i2,f8,f4,u2,a1,b1,c8,c16'.split(',')
- 
--        if 'float16' in np.typeDict:
-+        if 'Float16Col' in globals():
-             values.append(6.4)
-             formats.append('f2')
--        if 'float96' in np.typeDict:
-+        if 'Float96Col' in globals():
-             values.append(6.4)
-             formats.append('f12')
--        if 'float128' in np.typeDict:
-+        if 'Float128Col' in globals():
-             values.append(6.4)
-             formats.append('f16')
--        if 'complex192' in np.typeDict:
-+        if 'Complex192Col' in globals():
-             values.append(1.-0.j)
-             formats.append('c24')
--        if 'complex256' in np.typeDict:
-+        if 'Complex256Col' in globals():
-             values.append(1.-0.j)
-             formats.append('c32')
- 
-diff --git a/tables/tests/test_types.py b/tables/tests/test_types.py
-index 366ee83..460f846 100644
---- a/tables/tests/test_types.py
-+++ b/tables/tests/test_types.py
-@@ -23,15 +23,15 @@ class Record(IsDescription):
-     var5 = Col.from_kind('float', itemsize=4)  # float  (single-precision)
-     var6 = Col.from_kind('complex')  # double-precision
-     var7 = Col.from_kind('complex', itemsize=8)  # single-precision
--    if hasattr(numpy, "float16"):
-+    if "Float16Atom" in globals():
-         var8 = Col.from_kind('float', itemsize=2)  # half-precision
--    if hasattr(numpy, "float96"):
-+    if "Float96Atom" in globals():
-         var9 = Col.from_kind('float', itemsize=12)  # extended-precision
--    if hasattr(numpy, "float128"):
-+    if "Float128Atom" in globals():
-         var10 = Col.from_kind('float', itemsize=16)  # extended-precision
--    if hasattr(numpy, "complex192"):
-+    if "Complex192Atom" in globals():
-         var11 = Col.from_kind('complex', itemsize=24)  # extended-precision
--    if hasattr(numpy, "complex256"):
-+    if "Complex256Atom" in globals():
-         var12 = Col.from_kind('complex', itemsize=32)  # extended-precision
- 
- 
-@@ -71,11 +71,11 @@ class RangeTestCase(unittest.TestCase):
-         rec['var5'] = float(i)
-         rec['var6'] = float(i)
-         rec['var7'] = complex(i, i)
--        if hasattr(numpy, "float16"):
-+        if "Float16Atom" in globals():
-             rec['var8'] = float(i)
--        if hasattr(numpy, "float96"):
-+        if "Float96Atom" in globals():
-             rec['var9'] = float(i)
--        if hasattr(numpy, "float128"):
-+        if "Float128Atom" in globals():
-             rec['var10'] = float(i)
-         try:
-             rec.append()
-@@ -111,11 +111,11 @@ class RangeTestCase(unittest.TestCase):
-             self.fail("expected a TypeError")
-         rec['var6'] = float(i)
-         rec['var7'] = complex(i, i)
--        if hasattr(numpy, "float16"):
-+        if "Float16Atom" in globals():
-             rec['var8'] = float(i)
--        if hasattr(numpy, "float96"):
-+        if "Float96Atom" in globals():
-             rec['var9'] = float(i)
--        if hasattr(numpy, "float128"):
-+        if "Float128Atom" in globals():
-             rec['var10'] = float(i)
- 
- 
-@@ -204,7 +204,7 @@ class ReadFloatTestCase(common.PyTablesTestCase):
- 
-     def test04_read_longdouble(self):
-         dtype = "longdouble"
--        if hasattr(numpy, "float96") or hasattr(numpy, "float128"):
-+        if "Float96Atom" in globals() or "Float128Atom" in globals():
-             ds = getattr(self.fileh.root, dtype)
-             self.assertFalse(isinstance(ds, UnImplemented))
-             self.assertEqual(ds.shape, (self.nrows, self.ncols))
-@@ -212,30 +212,34 @@ class ReadFloatTestCase(common.PyTablesTestCase):
-             self.assertTrue(common.allequal(
-                 ds.read(), self.values.astype(dtype)))
- 
--            if hasattr(numpy, "float96"):
-+            if "Float96Atom" in globals():
-                 self.assertEqual(ds.dtype, "float96")
--            elif hasattr(numpy, "float128"):
-+            elif "Float128Atom" in globals():
-                 self.assertEqual(ds.dtype, "float128")
-         else:
-             # XXX: check
--            # ds = self.assertWarns(UserWarning,
--            #                       getattr, self.fileh.root, dtype)
--            # self.assertTrue(isinstance(ds, UnImplemented))
--
--            ds = getattr(self.fileh.root, dtype)
--            self.assertEqual(ds.dtype, "float64")
-+            # the behavior depends on the HDF5 lib configuration
-+            try:
-+                ds = self.assertWarns(UserWarning,
-+                                      getattr, self.fileh.root, dtype)
-+                self.assertTrue(isinstance(ds, UnImplemented))
-+            except AssertionError:
-+                ds = getattr(self.fileh.root, dtype)
-+                self.assertEqual(ds.dtype, "float64")
- 
-     def test05_read_quadprecision_float(self):
--        # ds = self.assertWarns(UserWarning, getattr, self.fileh.root,
--        #                     "quadprecision")
--        # self.assertTrue(isinstance(ds, UnImplemented))
--
--        # NOTE: it would be nice to have some sort of message that warns
--        #       against the potential precision loss: the quad-precision
--        #       dataset actually uses 128 bits for each element, not just
--        #       80 bits (longdouble)
--        ds = self.fileh.root.quadprecision
--        self.assertEqual(ds.dtype, "longdouble")
-+        # XXX: check
-+        try:
-+            ds = self.assertWarns(UserWarning, getattr, self.fileh.root,
-+                                  "quadprecision")
-+            self.assertTrue(isinstance(ds, UnImplemented))
-+        except AssertionError:
-+            # NOTE: it would be nice to have some sort of message that warns
-+            #       against the potential precision loss: the quad-precision
-+            #       dataset actually uses 128 bits for each element, not just
-+            #       80 bits (longdouble)
-+            ds = self.fileh.root.quadprecision
-+            self.assertEqual(ds.dtype, "longdouble")
- 
- 
- class AtomTestCase(common.PyTablesTestCase):
-diff --git a/tables/tests/test_vlarray.py b/tables/tests/test_vlarray.py
-index 4810470..6ca3173 100644
---- a/tables/tests/test_vlarray.py
-+++ b/tables/tests/test_vlarray.py
-@@ -861,7 +861,8 @@ class TypesTestCase(unittest.TestCase):
-                   "Float64",
-                   ]
-         for name in ("float16", "float96", "float128"):
--            if hasattr(numpy, name):
-+            atomname = name.capitalize() + 'Atom'
-+            if atomname in globals():
-                 ttypes.append(name)
- 
-         if common.verbose:
-@@ -903,11 +904,11 @@ class TypesTestCase(unittest.TestCase):
-             "Float32": numpy.float32,
-             "Float64": numpy.float64,
-         }
--        if hasattr(numpy, "float16"):
-+        if "Float16Atom" in globals():
-             ttypes["float16"] = numpy.float16
--        if hasattr(numpy, "float96"):
-+        if "Float96Atom" in globals():
-             ttypes["float96"] = numpy.float96
--        if hasattr(numpy, "float128"):
-+        if "Float128Atom" in globals():
-             ttypes["float128"] = numpy.float128
- 
-         if common.verbose:
-@@ -956,7 +957,8 @@ class TypesTestCase(unittest.TestCase):
-             "Float64",
-         ]
-         for name in ("float16", "float96", "float128"):
--            if hasattr(numpy, name):
-+            atomname = name.capitalize() + 'Atom'
-+            if atomname in globals():
-                 ttypes.append(name)
- 
-         if common.verbose:
-@@ -1002,11 +1004,11 @@ class TypesTestCase(unittest.TestCase):
-             "Float32": numpy.float32,
-             "Float64": numpy.float64,
-         }
--        if hasattr(numpy, "float16"):
-+        if "Float16Atom" in globals():
-             ttypes["float16"] = numpy.float16
--        if hasattr(numpy, "float96"):
-+        if "Float96Atom" in globals():
-             ttypes["float96"] = numpy.float96
--        if hasattr(numpy, "float128"):
-+        if "Float128Atom" in globals():
-             ttypes["float128"] = numpy.float128
- 
-         if common.verbose:
-@@ -1060,11 +1062,11 @@ class TypesTestCase(unittest.TestCase):
-             "Float32": numpy.float32,
-             "Float64": numpy.float64,
-         }
--        if hasattr(numpy, "float16"):
-+        if "Float16Atom" in globals():
-             ttypes["float16"] = numpy.float16
--        if hasattr(numpy, "float96"):
-+        if "Float96Atom" in globals():
-             ttypes["float96"] = numpy.float96
--        if hasattr(numpy, "float128"):
-+        if "Float128Atom" in globals():
-             ttypes["float128"] = numpy.float128
- 
-         if common.verbose:
-@@ -1123,9 +1125,9 @@ class TypesTestCase(unittest.TestCase):
-             "Complex64",
-         ]
- 
--        if hasattr(numpy, "complex192"):
-+        if "Complex192Atom" in globals():
-             ttypes.append("Complex96")
--        if hasattr(numpy, "complex256"):
-+        if "Complex256Atom" in globals():
-             ttypes.append("Complex128")
- 
-         if common.verbose:
-@@ -1171,9 +1173,9 @@ class TypesTestCase(unittest.TestCase):
-             "Complex64",
-         ]
- 
--        if hasattr(numpy, "complex192"):
-+        if "Complex192Atom" in globals():
-             ttypes.append("Complex96")
--        if hasattr(numpy, "complex256"):
-+        if "Complex256Atom" in globals():
-             ttypes.append("Complex128")
- 
-         if common.verbose:
-@@ -1840,10 +1842,15 @@ class MDTypesTestCase(unittest.TestCase):
-             "Complex32",
-             "Complex64",
-         ]
--        for name in ("float16", "float96", "float128",
--                     "Complex192", "Complex256"):
--            if hasattr(numpy, name):
-+
-+        for name in ("float16", "float96", "float128"):
-+            atomname = name.capitalize() + "Atom"
-+            if atomname in globals():
-                 ttypes.append(name.capitalize())
-+        for itemsize in (192, 256):
-+            atomname = "Complex%dAtom" % itemsize
-+            if atomname in globals():
-+                ttypes.append("Complex%d" % (itemsize // 2))
- 
-         root = self.rootgroup
-         if common.verbose:
-@@ -2322,11 +2329,17 @@ class FlavorTestCase(unittest.TestCase):
-             "Complex32",
-             "Complex64",
-         ]
--        for name in ("float16", "float96", "float128",
--                     "Complex192", "Complex256"):
--            if hasattr(numpy, name):
-+
-+        for name in ("float16", "float96", "float128"):
-+            atomname = name.capitalize() + "Atom"
-+            if atomname in globals():
-                 ttypes.append(name.capitalize())
- 
-+        for itemsize in (192, 256):
-+            atomname = "Complex%dAtom" % itemsize
-+            if atomname in globals():
-+                ttypes.append("Complex%d" % (itemsize // 2))
-+
-         root = self.rootgroup
-         if common.verbose:
-             print '\n', '-=' * 30
diff --git a/debian/patches/series b/debian/patches/series
index ac5372a..9bb6944 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 0002-use-dynamic-lib.patch
-0003-disable-extended-float-support.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