Author: | PyTables Developers |
---|---|
Contact: | pytables@googlemail.com |
The entire PyTables API as been made more PEP8 compliant (see gh-224).
This means that many methods, attributes, module global variables and also keyword parameters have been renamed to be compliant with PEP8 style guidelines (e.g. the tables.hdf5Version constant has been renamed into tables.hdf5_version).
We made the best effort to maintain compatibility to the old API for existing applications. In most cases, the old 2.x API is still available and usable even if it is now deprecated (see the Deprecations section).
The only important backwards incompatible API changes are for names of function/methods arguments. All uses of keyword arguments should be checked and fixed to use the new naming convention.
The new pt2to3 tool can be used to port PyTables based applications to the new API.
Many deprecated features and support for obsolete modules has been dropped:
Moreover:
The File.create_array(), File.create_carray(), File.create_earray(), File.create_vlarray(), and File.create_table() methods of the File objects gained a new (optional) keyword argument named obj. It can be used to initialize the newly created dataset with an existing Python object, though normally these are numpy arrays.
The atom/descriptor and shape parameters are now optional if the obj argument is provided.
The nodes.filenode has been completely rewritten to be fully compliant with the interfaces defined in the io module.
The FileNode classes currently implemented are intended for binary I/O.
Main changes:
The __version__ module constants has been removed from almost all the modules (it was not used after the switch to Git). Of course the package level constant (tables.__version__) still remains. Closes gh-112.
The lrange() has been dropped in favor of xrange (gh-181)
The parameters.MAX_THREADS configuration parameter has been dropped in favor of parameters.MAX_BLOSC_THREADS and parameters.MAX_NUMEXPR_THREADS (closes gh-147).
The conditions.compile_condition() function no more has a copycols argument, it was no more necessary since Numexpr 1.3.1. Closes gh-117.
The expectedsizeinMB parameter of the File.create_vlarray() and of the VLArrsy.__init__() methods has been replaced by expectedrows. See also (gh-35).
The Table.whereAppend() method has been renamed into Table.append_where() (closes gh-248).
Please refer to the Migrating from PyTables 2.x to 3.x document for more details about API changes and for some useful hint about the migration process from the 2.X API to the new one.
All methods of the Table class that take start, stop and step parameters (including Table.read(), Table.where(), Table.iterrows(), etc) have been redesigned to have a consistent behaviour. The meaning of the start, stop and step and their default values now always work exactly like in the standard slice objects. Closes gh-44 and gh-255.
Unicode attributes are not stored in the HDF5 file as pickled string. They are now saved on the HDF5 file as UTF-8 encoded strings.
Although this does not introduce any API breakage, files produced are different (for unicode attributes) from the ones produced by earlier versions of PyTables.
System attributes are now stored in the HDF5 file using the character set that reflects the native string behaviour: ASCII for Python 2 and UTF8 for Python 3. In any case, system attributes are represented as Python string.
The iterrows() method of *Array and Table as well as the Table.itersorted() now behave like functions in the standard itertools module. If the start parameter is provided and stop is None then the array/table is iterated from start to the last line. In PyTables < 3.0 only one element was returned.
Enjoy data!
—The PyTables Developers