[python-hdf5storage] 32/84: Made the h5py version variable private.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:25:00 UTC 2016


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

ghisvail-guest pushed a commit to annotated tag 0.1.10
in repository python-hdf5storage.

commit 1345ca5516dfb53a86be6a2dc6c5f349447f5b40
Author: Freja Nordsiek <fnordsie at gmail.com>
Date:   Mon Feb 9 20:37:17 2015 -0500

    Made the h5py version variable private.
---
 hdf5storage/Marshallers.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hdf5storage/Marshallers.py b/hdf5storage/Marshallers.py
index c14b00c..90a143b 100644
--- a/hdf5storage/Marshallers.py
+++ b/hdf5storage/Marshallers.py
@@ -44,9 +44,9 @@ from hdf5storage.lowlevel import write_data, read_data
 # Ubuntu 12.04's h5py doesn't have __version__ set so we need to try to
 # grab the version and if it isn't available, just assume it is 2.0.
 try:
-    H5PY_VERSION = h5py.__version__
+    _H5PY_VERSION = h5py.__version__
 except:
-    H5PY_VERSION = '2.0'
+    _H5PY_VERSION = '2.0'
 
 
 def write_object_array(f, data, options):
@@ -546,7 +546,7 @@ class NumpyScalarArrayMarshaller(TypeMarshaller):
         self.matlab_classes = list(self.__MATLAB_classes.values())
 
         # For h5py >= 2.2, half precisions (np.float16) are supported.
-        if distutils.version.LooseVersion(H5PY_VERSION) \
+        if distutils.version.LooseVersion(_H5PY_VERSION) \
                 >= distutils.version.LooseVersion('2.2'):
             self.types.append(np.float16)
             self.python_type_strings.append('numpy.float16')
@@ -856,7 +856,7 @@ class NumpyScalarArrayMarshaller(TypeMarshaller):
             # individual characters.
             if options.matlab_compatible \
                     and distutils.version.LooseVersion( \
-                    H5PY_VERSION) \
+                    _H5PY_VERSION) \
                     >= distutils.version.LooseVersion('2.3'):
                 try:
                     dt = h5py.special_dtype(vlen=np.dtype('S1'))
@@ -952,7 +952,7 @@ class NumpyScalarArrayMarshaller(TypeMarshaller):
         # If we are using h5py version >= 2.3, we can actually read the
         # MATLAB_fields Attribute if it is present.
         matlab_fields = None
-        if distutils.version.LooseVersion(H5PY_VERSION) \
+        if distutils.version.LooseVersion(_H5PY_VERSION) \
                 >= distutils.version.LooseVersion('2.3'):
             matlab_fields = get_attribute(grp[name], 'MATLAB_fields')
 
@@ -1498,7 +1498,7 @@ class PythonDictMarshaller(TypeMarshaller):
         # should be deleted. It is written as a vlen='S1' array of
         # bytes_ arrays of the individual characters.
         if options.matlab_compatible \
-                and distutils.version.LooseVersion(H5PY_VERSION) \
+                and distutils.version.LooseVersion(_H5PY_VERSION) \
                 >= distutils.version.LooseVersion('2.3'):
             try:
                 dt = h5py.special_dtype(vlen=np.dtype('S1'))

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



More information about the debian-science-commits mailing list