bagofholding.h5.format_versions module

Pinned HDF5 write-format (“libver”) codes and the checks around them.

bagofholding.h5.format_versions.allowed_libvers(max_libver: str) → tuple[str, ...][source]

The libver codes no newer than max_libver, oldest first.

bagofholding.h5.format_versions.check_hdf5_supports(max_libver: str) → None[source]

Raise if the installed HDF5 is too old to write max_libver.

bagofholding.h5.format_versions.check_stored_libver(stored: str | None, max_libver: str) → None[source]

Raise if a bag’s stored libver is neither “latest” nor an allowed code.

bagofholding.h5.format_versions.resolve_save_libver(libver: str | None, max_libver: str) → str[source]

The libver to save with: max_libver if None, else libver if allowed.