Author: | Francesc Altet |
---|---|
Contact: | faltet@carabos.com |
Author: | Ivan Vilata i Balaguer |
Contact: | ivilata@carabos.com |
This document details the modifications to PyTables since version 0.9.1. Its main purpose is help you ensure that your programs will be runnable when you switch from PyTables 0.9.1 to PyTables 1.0.
The following modifications, though being (strictly speaking) modifications of the API, will most probably not cause compatibility problems (but your mileage may vary):
The default values for name and classname arguments in File.getNode() are now None, although the empty string is still allowed for backwards compatibility. File hierarchy manipulation and attribute handling operations using those arguments have changed to reflect this.
Copy operations (Group._f_copyChildren(), File.copyChildren(), File.copyNode()...) do no longer return a tuple with the new node and statistics. Instead, they only return the new node, and statistics are collected via an optional keyword argument.
The copyFile() function in File.py has changed its signature from:
copyFile(srcfilename=None, dstfilename=None, title=None, filters=None,
copyuserattrs=True, overwrite=False, stats=None)
to:
copyFile(srcfilename, dstfilename, overwrite=False, **kwargs)
Thus, the function allows the same options as File.copyFile().
The File.copyFile() method has changed its signature from:
copyFile(self, dstfilename=None, title=None, filters=None,
copyuserattrs=1, overwrite=0, stats=None):
to:
copyFile(self, dstfilename, overwrite=False, **kwargs)
This enables this method to pass on arbitrary flags and options supported by copying methods of inner nodes in the hierarchy.
The File.copyChildren() method has changed its signature from:
copyChildren(self, wheresrc, wheredst, recursive=False, filters=None,
copyuserattrs=True, start=0, stop=None, step=1,
overwrite=False, stats=None)
to:
copyChildren(self, srcgroup, dstgroup, overwrite=False, recursive=False,
**kwargs):
Thus, the function allows the same options as Group._f_copyChildren().
The Group._f_copyChildren() method has changed its signature from:
_f_copyChildren(self, where, recursive=False, filters=None,
copyuserattrs=True, start=0, stop=None, step=1,
overwrite=False, stats=None)
to:
_f_copyChildren(self, dstgroup, overwrite=False, recursive=False,
**kwargs)
This enables this method to pass on arbitrary flags and options supported by copying methods of inner nodes in the group.
Renamed srcFilename and dstFilename arguments in copyFile() and File.copyFile() to srcfilename and dstfilename, respectively. Renamed whereSrc and whereDst arguments in File.copyChildren() to wheresrc and wheredst, respectively. Renamed dstNode argument in File.copyAttrs() to dstnode. Tose arguments should be easier to type in interactive sessions (although 99% of the time it is not necessary to specify them).
Renamed object argument in EArray.append() to sequence.
The rows argument in Table.append() is now compulsory.
The start argument in Table.removeRows() is now compulsory.
The isHDF5() function has been deprecated in favor of isHDF5File().
Node attribute-handling methods in File have been renamed for a better coherence and understanding of their purpose:
They keep their respective signatures, and the old versions still exist for backwards compatibility, though they issue a DeprecationWarning.
Using VLArray.append() with multiple arguments is now deprecated for its ambiguity. You should put the arguments in a single sequence object (list, tuple, array...) and pass it as the only argument.
Using table['colname'] is deprecated. Using table.col('colname') (with the new col() method) is preferred.
Enjoy data!
—The PyTables Team