Following the upgrade to hdf5 @1.14.4.2_1+cxx+fortran+gfortran+hl I get an error message in Python when I load h5py. I took care to uninstall and reinstall the py-h5py and py312-h5py ports, so now I have:
$ port installed | grep hdf
hdf5 @1.14.3_4+cxx+fortran+gfortran+hl
hdf5 @1.14.4.2_0+cxx+fortran+gfortran+hl
hdf5 @1.14.4.2_1+cxx+fortran+gfortran+hl (active)
$ port installed | grep h5
py-h5py @3.11.0_1 (active)
py312-h5py @3.11.0_1 (active)
The error I get is:
$ python
Python 3.12.3 (main, Apr 12 2024, 20:23:48) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import h5py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/h5py/__init__.py", line 45, in <module>
from ._conv import register_converters as _register_converters, \
File "h5py/_conv.pyx", line 1, in init h5py._conv
File "h5py/h5r.pyx", line 1, in init h5py.h5r
File "h5py/h5p.pyx", line 1, in init h5py.h5p
File "h5py/h5t.pyx", line 235, in init h5py.h5t
File "h5py/h5t.pyx", line 80, in h5py.h5t.lockid
File "h5py/h5t.pyx", line 49, in h5py.h5t.typewrap
ValueError: Not a datatype (not a datatype)
The error message goes away if I do sudo port activate hdf5 @1.14.4.2_0+cxx+fortran+gfortran+hl
and then run python, so it must be associated with the patch introduced in hdf5 in #69861. (Also h5py worked fine with the previous version hdf5 @1.14.3_4+cxx+fortran+gfortran+hl). However, it seemed best to open a new ticket. I am running with Xcode v15.3, Sonoma 14.4.1 on an Intel-based Mac mini.
In case it helps, I see (what looks like) the same issue arising in https://github.com/h5py/h5py/issues/2419 . I'm absolutely not competent to follow it up or suggest a fix, though.