|
| 1 | +What's new in h5py 3.16 |
| 2 | +======================= |
| 3 | + |
| 4 | +New features |
| 5 | +------------ |
| 6 | + |
| 7 | +* Pre-built packages on PyPI are now built with HDF5 2.0 (:pr:`2750`) |
| 8 | +* h5py now marks itself compatible with free-threading Python (:pr:`2702`, |
| 9 | + :pr:`2745`). There are tests for this (:pr:`2761`), but there may still be |
| 10 | + bugs. Be cautious about relying on this in critical code. |
| 11 | +* Support for storing NumPy complex numbers in HDF5 files using C99 complex |
| 12 | + number datatypes (:pr:`2694`). This feature is available with HDF5 library 2.0 |
| 13 | + or above, so long as the compiler and the build platform implement the relevant |
| 14 | + C99 features. |
| 15 | + |
| 16 | + h5py will still convert NumPy complex numbers into an HDF5 compound datatype |
| 17 | + by default, preserving the behaviour from earlier versions. See |
| 18 | + :ref:`complex_dtypes` for how to use the new datatypes. |
| 19 | +* New attributes :attr:`~.Dataset.filter_ids` and :attr:`~.Dataset.filter_names` |
| 20 | + to provide more precise information on the filters set up for a dataset |
| 21 | + (:pr:`2792`). See :ref:`dataset_compression`. |
| 22 | +* New :meth:`h5py.Group.get` arguments to configure external links access |
| 23 | + properties: ``elink_mode``, ``elink_swmr`` and ``elink_locking`` (:pr:`2751`). |
| 24 | +* Pre-built Mac & Windows packages on PyPI now bundle zlib 1.3.2 (:pr:`2808`). |
| 25 | + |
| 26 | +Breaking Changes and Deprecations |
| 27 | +--------------------------------- |
| 28 | + |
| 29 | +* Creating a dataset with neither ``data`` nor ``dtype`` specified is deprecated. |
| 30 | + We plan to make this an error in h5py 4.0. Use ``dtype='f4'`` to keep the |
| 31 | + current default (which is different from NumPy's default). |
| 32 | +* ``h5py.config().read_byte_strings`` is deprecated. This has no effect since |
| 33 | + h5py 3.0, and we plan to get rid of it in 4.0. |
| 34 | + |
| 35 | + |
| 36 | +Bug fixes |
| 37 | +--------- |
| 38 | + |
| 39 | +* Indexing datasets with an array or list of indices is now much faster when |
| 40 | + selecting many indices (:pr:`2603`). |
| 41 | +* Fixed a memory leak involving the object registry (:pr:`2783`). |
| 42 | +* Fix selecting parts of a multi-dimensional dataset with a boolean array |
| 43 | + corresponding to the first dimension (:pr:`2769`). |
| 44 | +* Correctly raise errors when trying to write data to a zero-sized dataset or |
| 45 | + a zero-sized slice (:pr:`2729`). |
| 46 | +* When creating a dataset, the ``dtype=`` parameter can now be a |
| 47 | + :class:`TypeID <low:h5py.h5t.TypeID>` object from the low-level API. |
| 48 | +* Various fixes for safe usage from multiple threads (:pr:`2795`, :pr:`2794`, |
| 49 | + :pr:`2764`). |
| 50 | +* Trying to store region references in a dataset for object references now |
| 51 | + raises ``TypeError`` instead of discarding information (:pr:`2790`). See |
| 52 | + :doc:`/refs` for more about references. |
| 53 | +* A list of reference objects can be used to create a dataset (:pr:`2790`). |
| 54 | +* Fix getting filter details for the :ref:`scaleoffset filter |
| 55 | + <dataset_scaleoffset>` (:pr:`2781`). |
| 56 | +* Better error message when attempting to slice a dataset with None or |
| 57 | + ``np.newaxis`` (:pr:`2731`). |
| 58 | +* Pre-built Windows packages on PyPI now bundle a recent version of zlib |
| 59 | + (:pr:`2730`). |
| 60 | +* Avoid replacing ``arr.shape``, which will break in some future version of |
| 61 | + NumPy (:pr:`2728`). |
| 62 | +* Closing files should be slightly faster after a redundant call was removed |
| 63 | + (:pr:`2801`) |
| 64 | + |
| 65 | + |
| 66 | +Exposing HDF5 functions |
| 67 | +----------------------- |
| 68 | + |
| 69 | +* H5Scombine_select, H5Smodify_select, and H5Sselect_copy (:pr:`2603`). |
| 70 | + |
| 71 | +Building h5py |
| 72 | +------------- |
| 73 | + |
| 74 | +* Fix building against pre-release versions of NumPy (:pr:`2758`). |
| 75 | +* Fix some compiler warnings (:pr:`2784`, :pr:`2791`). |
| 76 | +* The package metadata now requires mpi4py 4.0.0 for MPI builds on Python <= 3.12 |
| 77 | + (:pr:`2799`). This works around an issue building older mpi4py with recent |
| 78 | + versions of setuptools. If you are building from source yourself, it may still |
| 79 | + work with mpi4py 3.x. |
0 commit comments