Changes from 3.1.0 to 3.1.1¶
Fixed a critical bug that caused an exception at import time. The error was triggered when a bug in long-double detection is detected in the HDF5 library (see gh-275) and numpy does not expose float96 or float128. Closes gh-344.
The internal Blosc library has been updated to version 1.3.5. This fixes a false buffer overrun condition that made c-blosc to fail, even if the problem was not real.
Added two new utility functions (
tables.nodes.filenode.save_to_filenode()) for the direct copy from filesystem to filenode and vice versa (closes gh-342). Thanks to Andreas Hilboll.
examples/nested-iter.pyconsidered no longer useful. Closes gh-343.
Better detection of the -msse2 compiler flag.
Changes from 3.0 to 3.1.0¶
Now PyTables is able to save/restore the default value of
EnumAtomtypes (closes gh-234).
New quantization filter: the filter truncates floating point data to a specified precision before writing to disk. This can significantly improve the performance of compressors (closes gh-261). Thanks to Andreas Hilboll.
The internal Blosc library has been updated to version 1.3.2. All new features introduced in the Blosc 1.3.x series, and in particular the ability to leverage different compressors within Blosc (see the Blosc Release Notes), are now available in PyTables via the blosc filter (closes: gh-324). A big thank you to Francesc.
The node caching mechanism has been completely redesigned to be simpler and less dependent from specific behaviours of the
__del__method. Now PyTables is compatible with the forthcoming Python 3.4. Closes gh-306.
PyTables no longer uses shared/cached file handlers. This change somewhat improves support for concurrent reading allowing the user to safely open the same file in different threads for reading (requires HDF5 >= 1.8.7). More details about this change can be found in the Backward incompatible changes section. See also gh-130, gh-129 gh-292 and gh-216.
PyTables is now able to detect and use external installations of the Blosc library (closes gh-104). If Blosc is not found in the system, and the user do not specify a custom installation directory, then it is used an internal copy of the Blosc source code.
Documented an unexpected behaviour with string literals in query conditions on Python 3 (closes gh-265)
getoptmodule has been dropped in favour of
argparsein all command line utilities (close gh-251)
Improved the installation section of the PyTables User’s Guide.
The code of the benchmark programs (bench directory) has been updated. Closes gh-114.
Fixed some warning related to non-unicode file names (the Windows bytes API has been deprecated in Python 3.4)
Fixed detection of platforms supporting Blosc
Fix computation of the buffer size for iterations on rows. The buffers size was overestimated resulting in a
MemoryErrorin some cases. Closes gh-316. Thamks to bbudescu.
Better check of file open mode. Closes gh-318.
The Blosc filter now works correctly together with fletcher32. Closes gh-21.
Close the file handle before trying to delete the corresponding file. Fixes a test failure on Windows.
Use integer division for computing indices (fixes some warning on Windows)
Following the plan for the complete transition to the new (PEP8 compliant)
API, all calls to the old API will raise a
The new API has been introduced in PyTables 3.0 and is backward incompatible. In order to guarantee a smoother transition the old API is still usable even if it is now deprecated.
The plan for the complete transition to the new API is outlined in gh-224.
Backward incompatible changes¶
In PyTables <= 3.0 file handles (objects that are returned by the
open_file() function) were stored in an internal registry and re-used
Two subsequent attempts to open the same file (with compatible open mode) returned the same file handle in PyTables <= 3.0:
In : import tables In : print(tables.__version__) 3.0.0 In : a = tables.open_file('test.h5', 'a') In : b = tables.open_file('test.h5', 'a') In : a is b Out: True
All this is an implementation detail, it happened under the hood and the user had no control over the process.
This kind of behaviour was considered a feature since it can speed up opening of files in case of repeated opens and it also avoids any potential problem related to multiple opens, a practice that the HDF5 developers recommend to avoid (see also H5Fopen reference page).
The trick, of course, is that files are not opened multiple times at HDF5 level, rather an open file is referenced several times.
The big drawback of this approach is that there are really few chances to use PyTables safely in a multi thread program. Several bug reports have been filed regarding this topic.
After long discussions about the possibility to actually achieve concurrent I/O and about patterns that should be used for the I/O in concurrent programs PyTables developers decided to remove the black magic under the hood and allow the users to implement the patterns they want.
Starting from PyTables 3.1 file handles are no more re-used (shared) and
each call to the
open_file() function returns a new file handle:
In : import tables In : print tables.__version__ 3.1.0 In : a = tables.open_file('test.h5', 'a') In : b = tables.open_file('test.h5', 'a') In : a is b Out: False
It is important to stress that the new implementation still has an internal registry (implementation detail) and it is still not thread safe. Just now a smart enough developer should be able to use PyTables in a muti-thread program without too much headaches.
The new implementation behaves differently from the previous one, although the API has not been changed. Now users should pay more attention when they open a file multiple times (as recommended in the HDF5 reference ) and they should take care of using them in an appropriate way.
Please note that the
File.open_count property was originally intended
to keep track of the number of references to the same file handle.
In PyTables >= 3.1, despite of the name, it maintains the same semantics, just
now its value should never be higher that 1.
HDF5 versions lower than 1.8.7 are not fully compatible with PyTables 3.1. A partial support to HDF5 < 1.8.7 is still provided but in that case multiple file opens are not allowed at all (even in read-only mode).