diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e465526..1d576a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Enhancements -* Changed default object_codec_class for ZarrIO to numcodecs.JSON. The issue with the old default (numcodecs.Pickle) was that it was not readable outside of Python. Also, exposed the object_codec_class as a parameter to the NWBZarrIO constructor. +* Changed default object_codec_class for ZarrIO to numcodecs.JSON. The issue with the old default (numcodecs.Pickle) was that it was not readable outside of Python. Exposed the object_codec_class as a parameter to the NWBZarrIO constructor. Resort to Pickle for complex cases such as structured arrays or compound datasets with refs. ## 0.6.0 (February 21, 2024) diff --git a/src/hdmf_zarr/backend.py b/src/hdmf_zarr/backend.py index b31178d6..0fed1601 100644 --- a/src/hdmf_zarr/backend.py +++ b/src/hdmf_zarr/backend.py @@ -1052,7 +1052,7 @@ def write_dataset(self, **kwargs): # noqa: C901 object_codec = self.__codec_cls() if not isinstance(object_codec, numcodecs.Pickle): - print(f'Resorting to Pickle codec for dataset {name} of {parent.name}') + warnings.warn(f'Resorting to Pickle codec for dataset {name} of {parent.name}') object_codec = numcodecs.Pickle() # cast and store compound dataset @@ -1287,7 +1287,7 @@ def __list_fill__(self, parent, name, data, options=None): # noqa: C901 if has_structured_array: object_codec = io_settings.get('object_codec') if not isinstance(object_codec, numcodecs.Pickle): - print(f'Warning: Resorting to Pickle codec for {name} of {parent.name}.') + warnings.warn(f'Resorting to Pickle codec for {name} of {parent.name}.') io_settings['object_codec'] = numcodecs.Pickle() # Create the dataset