diff --git a/CHANGELOG.md b/CHANGELOG.md index a90e1873c..907fa9a7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,15 +2,17 @@ ## HDMF 3.9.1 (Upcoming) +### Minor improvements +- Removed warning when namespaces are loaded and the attribute marking where the specs are cached is missing. @bendichter [#926](https://github.com/hdmf-dev/hdmf/pull/926) + ### Bug fixes - Fixed bug allowing `DynamicTable` to be constructed with empty `id` column when initializing all columns via `AbstractDataChunkIterator` objects. @oruebel [#953](https://github.com/hdmf-dev/hdmf/pull/953) - ## HDMF 3.9.0 (August 25, 2023) ### New features and minor improvements -- Increase raw data chunk cache size for reading HDF5 files from 1 MiB to 32 MiB. @bendichter, @rly [#925](https://github.com/hdmf-dev/hdmf/pull/925) -- Increase default chunk size for `GenericDataChunkIterator` from 1 MB to 10 MB. @bendichter, @rly [#925](https://github.com/hdmf-dev/hdmf/pull/925) +- Increased raw data chunk cache size for reading HDF5 files from 1 MiB to 32 MiB. @bendichter, @rly [#925](https://github.com/hdmf-dev/hdmf/pull/925) +- Increased default chunk size for `GenericDataChunkIterator` from 1 MB to 10 MB. @bendichter, @rly [#925](https://github.com/hdmf-dev/hdmf/pull/925) - Added the magic `__reduce__` method as well as two private semi-abstract helper methods to enable pickling of the `GenericDataChunkIterator`. @codycbakerphd [#924](https://github.com/hdmf-dev/hdmf/pull/924) - Updated `add_ref_termset` to add all instances of `TermSet` within a given root container. @mavaylon1 [#935](https://github.com/hdmf-dev/hdmf/pull/935) - Added Dynamic Enumerations and Schemasheets support to `TermSet`. @mavaylon1 [#923](https://github.com/hdmf-dev/hdmf/pull/923) diff --git a/src/hdmf/backends/hdf5/h5tools.py b/src/hdmf/backends/hdf5/h5tools.py index b4286eb6c..2bebbc3d7 100644 --- a/src/hdmf/backends/hdf5/h5tools.py +++ b/src/hdmf/backends/hdf5/h5tools.py @@ -208,12 +208,7 @@ def __load_namespaces(cls, namespace_catalog, namespaces, file_obj): @classmethod def __check_specloc(cls, file_obj): - if SPEC_LOC_ATTR not in file_obj.attrs: - # this occurs in legacy files - msg = "No cached namespaces found in %s" % file_obj.filename - warnings.warn(msg) - return False - return True + return SPEC_LOC_ATTR in file_obj.attrs @classmethod @docval({'name': 'path', 'type': (str, Path), 'doc': 'the path to the HDF5 file', 'default': None}, diff --git a/tests/unit/test_io_hdf5_h5tools.py b/tests/unit/test_io_hdf5_h5tools.py index a45f5563d..68680db76 100644 --- a/tests/unit/test_io_hdf5_h5tools.py +++ b/tests/unit/test_io_hdf5_h5tools.py @@ -2159,9 +2159,7 @@ def test_load_namespaces_no_specloc(self): # load the namespace from file ns_catalog = NamespaceCatalog() - msg = "No cached namespaces found in %s" % self.path - with self.assertWarnsWith(UserWarning, msg): - ret = HDF5IO.load_namespaces(ns_catalog, self.path) + ret = HDF5IO.load_namespaces(ns_catalog, self.path) self.assertDictEqual(ret, {}) def test_load_namespaces_resolve_custom_deps(self): @@ -2375,9 +2373,7 @@ def test_get_namespaces_no_specloc(self): del f.attrs[SPEC_LOC_ATTR] # load the namespace from file - msg = "No cached namespaces found in %s" % self.path - with self.assertWarnsWith(UserWarning, msg): - ret = HDF5IO.get_namespaces(path=self.path) + ret = HDF5IO.get_namespaces(path=self.path) self.assertDictEqual(ret, {})