[h5py] 260/455: Change File.name property & update release announcement
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.
commit 8a60672cf1254389fd13a1814dc0ab24c7228878
Author: andrewcollette <andrew.collette at gmail.com>
Date: Tue Jun 2 18:14:51 2009 +0000
Change File.name property & update release announcement
---
ANN.txt | 26 +++++++++++++++++++++++---
h5py/highlevel.py | 12 +++++++++---
h5py/tests/common.py | 2 +-
h5py/tests/test_highlevel.py | 8 ++++----
4 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/ANN.txt b/ANN.txt
index 63363a8..b8a5cb0 100644
--- a/ANN.txt
+++ b/ANN.txt
@@ -2,6 +2,12 @@
Announcing HDF5 for Python (h5py) 1.2 *BETA*
============================================
+I'm pleased to announce the availability of HDF5 for Python 1.2 beta! This
+release represents a significant update to the h5py feature set. The beta
+will be available until the official release on or around June 14. Bug
+reports, questions and complaints are welcome and needed! You can contact
+"h5py at alfven dot org" or file a bug directly at h5py.googlecode.com.
+
What is h5py?
-------------
@@ -21,9 +27,6 @@ In addition to providing interoperability with existing HDF5 datasets
and platforms, h5py is a convienient way to store and retrieve
arbitrary NumPy data and metadata.
-Version 1.2 is a significant update to h5py, introducing several new features.
-
-
What's new in 1.2
-----------------
@@ -50,6 +53,23 @@ What's new in 1.2
- More Pythonic dictionary-style naming system for groups and attributes
+Design revisions since 1.1
+--------------------------
+
+ - The role of the "name" attribute on File objects has changed. "name"
+ now returns the HDF5 path of the File object ('/'); the file name on
+ disk is now available at File.filename.
+
+ - Dictionary-interface methods for Group and AttributeManager objects have
+ been renamed to follow the standard Python convention (keys(), values(),
+ etc). The old method names are still available but deprecated. They
+ will not be removed until h5py 1.4 or equivalent.
+
+ - The HDF5 shuffle filter is no longer automatically activated when
+ GZIP or LZF compression is used; may datasets "in the wild" do not
+ benefit from shuffling.
+
+
Standard features
-----------------
diff --git a/h5py/highlevel.py b/h5py/highlevel.py
index 88f5f7e..7cb5717 100644
--- a/h5py/highlevel.py
+++ b/h5py/highlevel.py
@@ -521,9 +521,9 @@ class File(Group):
"""
@property
- def name(self):
+ def filename(self):
"""File name on disk"""
- return self._name
+ return h5f.get_name(self.fid)
@property
def mode(self):
@@ -549,6 +549,13 @@ class File(Group):
- w Create file, truncate if exists
- w- Create file, fail if exists
- a Read/write if exists, create otherwise (default)
+
+ Valid drivers are:
+ - None Use default driver ('sec2' on UNIX, 'windows' on Win32)
+ - 'sec2' Standard UNIX driver
+ - 'stdio' Stdio (buffered) driver
+ - 'core' mmap driver
+ - 'family' Multi-part file driver
"""
plist = h5p.create(h5p.FILE_ACCESS)
plist.set_fclose_degree(h5f.CLOSE_STRONG)
@@ -583,7 +590,6 @@ class File(Group):
self.id = self.fid # So the Group constructor can find it.
Group.__init__(self, self, '/')
- self._name = name
self._mode = mode
def close(self):
diff --git a/h5py/tests/common.py b/h5py/tests/common.py
index dafc955..f3dee94 100644
--- a/h5py/tests/common.py
+++ b/h5py/tests/common.py
@@ -55,7 +55,7 @@ def makehdf():
return f
def delhdf(f):
- fname = f.name
+ fname = f.filename
f.close()
os.unlink(fname)
diff --git a/h5py/tests/test_highlevel.py b/h5py/tests/test_highlevel.py
index d92c563..b13ba03 100644
--- a/h5py/tests/test_highlevel.py
+++ b/h5py/tests/test_highlevel.py
@@ -60,7 +60,7 @@ class TestFile(HDF5TestCase):
self.assert_(isinstance(f["CompoundChunked"], Dataset))
self.assertRaises(H5Error, f.create_group, "FooBar")
self.assertEqual(f.mode, 'r')
- self.assertEqual(f.name, self.fname)
+ self.assertEqual(f.filename, self.fname)
def test_File_init_rp(self):
with File(self.fname, 'r+') as f:
@@ -68,7 +68,7 @@ class TestFile(HDF5TestCase):
f.create_group("FooBar")
self.assert_(isinstance(f["FooBar"], Group))
self.assertEqual(f.mode, 'r+')
- self.assertEqual(f.name, self.fname)
+ self.assertEqual(f.filename, self.fname)
def test_File_init_a(self):
with File(self.fname, 'a') as f:
@@ -76,7 +76,7 @@ class TestFile(HDF5TestCase):
f.create_group("FooBar")
self.assert_(isinstance(f["FooBar"], Group))
self.assertEqual(f.mode, 'a')
- self.assertEqual(f.name, self.fname)
+ self.assertEqual(f.filename, self.fname)
def test_File_init_w(self):
with File(self.fname, 'w') as f:
@@ -84,7 +84,7 @@ class TestFile(HDF5TestCase):
f.create_group("FooBar")
self.assert_(isinstance(f["FooBar"], Group))
self.assertEqual(f.mode, 'w')
- self.assertEqual(f.name, self.fname)
+ self.assertEqual(f.filename, self.fname)
def test_File_init_wm(self):
self.assertRaises(H5Error, File, self.fname, 'w-')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git
More information about the debian-science-commits
mailing list