unstale

pypi / h5py

h5py

What changed in h5py 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-30.

21 breaking12 new APIs and options3 performance3 behavior and defaults7 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

h5py 346 changes

Breaking changes 21

  • The deprecated property was removed; use ds[()] to read all data from any dataset.

    3.0.0upgrade guide

  • The broken inherited method was removed because the dimensions interface behaves as a sequence, not a mapping.

    3.0.0upgrade guide

  • The broken inherited method was removed because the dimensions interface behaves as a sequence, not a mapping.

    3.0.0upgrade guide

  • The default mode for opening files is now read-only; specify another mode if you need to write.

    3.0.0upgrade guide

  • The deprecated attribute was removed; use File.id instead.

    3.0.0upgrade guide

  • The deprecated function was removed; see the newer APIs for special types.

    3.0.0upgrade guide

  • The deprecated function was removed; see the newer APIs for special types.

    3.0.0upgrade guide

  • Creating a dataset from a list of bytes objects now uses a variable-length string datatype; use h5py.string_dtype() for fixed-length strings.

    3.0.0upgrade guide

  • The external argument accepts any iterable as its top-level container, bytes or os.PathLike file names, and NumPy integer offsets and sizes; some previous forms are no longer accepted.

    3.0.0upgrade guide

  • Its third argument is now an optional high-level Dataset object rather than a DatasetID.

    3.0.0upgrade guide

  • The deprecated dictionary was removed.

    3.0.0upgrade guide

  • The deprecated module was removed; the high-level API is available directly in the h5py module.

    3.0.0upgrade guide

  • MPI mode no longer supports mpi4py 1.x.

    3.0.0upgrade guide

  • The deprecated function was removed; see the newer APIs for special types.

    3.0.0upgrade guide

  • The deprecated function was removed; see the newer APIs for special types.

    3.0.0upgrade guide

  • h5py now requires Python 3.6 or above and is no longer compatible with Python 2.7.

    3.0.0upgrade guide

  • The command was removed; build configuration can be specified with environment variables instead.

    3.0.0upgrade guide

  • The interface and rules for storing and reading strings have changed and may require changes to existing h5py code.

    3.0.0upgrade guide

  • Variable-length UTF-8 strings in datasets are now read as bytes by default instead of str.

    3.0.0upgrade guide

  • Relative paths are now used for virtual data sources when the source dataset is in the same file as the virtual dataset.

    3.0.0upgrade guide

  • A dtype must now be specified when making a virtual dataset; there is no longer a default dtype.

    3.0.0upgrade guide

New APIs and options 12

  • Reads only selected fields from a dataset with a compound datatype.

    3.0.0upgrade guide

  • Iterates over chunks within the given selection.

    3.0.0upgrade guide

  • Provides the size of a dataset’s data in bytes, unlike size, which gives the number of elements.

    3.0.0upgrade guide

  • File creation now supports setting the file space strategy, including an option to persist empty space tracking between sessions.

    3.0.0upgrade guide

  • The low-level chunk query API provides information about dataset chunks in an HDF5 file.

    3.0.0upgrade guide

  • The low-level chunk query API provides information about dataset chunks in an HDF5 file.

    3.0.0upgrade guide

  • The low-level chunk query API provides information about dataset chunks in an HDF5 file.

    3.0.0upgrade guide

  • Adds allow_unknown_filter for data that will be compressed before writing with the low-level write_direct_chunk() method.

    3.0.0upgrade guide

  • Use a suitable dtype from this API to store fixed-length strings.

    3.0.0upgrade guide

  • Can now be stored and read as HDF5 opaque data, though other tools will not understand them.

    3.0.0upgrade guide

  • Methods accepting a shape tuple, such as dataset creation, now also accept an integer for a 1D shape.

    3.0.0upgrade guide

  • h5py now supports the split file driver.

    3.0.0upgrade guide

Performance 3

  • Selection is implemented in Cython, reducing reading overhead; many small reads from the same dataset can be as much as 10 times faster.

    3.0.0upgrade guide

  • Reading and writing release the GIL so another Python thread can continue during HDF5 access; HDF5’s global lock still prevents faster parallel data access with multithreading.

    3.0.0upgrade guide

  • Writing is more efficient when assigning a scalar to a chunked dataset if the number of elements written is no more than one chunk.

    3.0.0upgrade guide

Behavior and default changes 3

  • Casting data to a specified type on reading can now be used without a with statement.

    3.0.0upgrade guide

  • Now works for any file driver that supports it, not only the sec2 driver.

    3.0.0upgrade guide

  • Virtual datasets can now grow as their source data is resized.

    3.0.0upgrade guide

Fixes and other changes 7

  • obj.attrs can now work on HDF5 stored datatypes.

    3.0.0upgrade guide

  • The property now handles SWMR access modes in addition to plain RDONLY and RDWR modes.

    3.0.0upgrade guide

  • The property is now always available.

    3.0.0upgrade guide

  • Fixed a bug when the source is a high-level object and the destination is a Group.

    3.0.0upgrade guide

  • Now reports storage size of zero bytes without raising an exception.

    3.0.0upgrade guide

  • h5py is now compatible with HDF5 1.12.

    3.0.0upgrade guide

  • When built against HDF5 1.10.6, h5py uses UTF-8 for file names on Windows, allowing all filenames.

    3.0.0upgrade guide