diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e3f480c8..4462ff604 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # HDMF Changelog +## [Unreleased] + +### Changed +- `hdmf.monitor` is unused and undocumented. It has been deprecated and will be removed in HDMF 5.0. @rly [#1245](https://github.com/hdmf-dev/hdmf/pull/1245) + ## HDMF 4.0.0 (January 22, 2025) ### Breaking changes diff --git a/src/hdmf/monitor.py b/src/hdmf/monitor.py index 823ccf72d..9f8e7e0cc 100644 --- a/src/hdmf/monitor.py +++ b/src/hdmf/monitor.py @@ -1,8 +1,16 @@ from abc import ABCMeta, abstractmethod +import warnings from .data_utils import AbstractDataChunkIterator, DataChunkIterator, DataChunk from .utils import docval, getargs +warnings.warn( + "The hdmf.monitor module is deprecated and will be removed in HDMF 5.0. If you are using this module, " + "please copy this module to your codebase or raise an issue in the HDMF repository: " + "https://github.com/hdmf-dev/hdmf/issues", + DeprecationWarning, +) + class NotYetExhausted(Exception): pass diff --git a/tests/unit/test_monitor.py b/tests/unit/test_monitor.py new file mode 100644 index 000000000..f9af06a9c --- /dev/null +++ b/tests/unit/test_monitor.py @@ -0,0 +1,6 @@ +import pytest + + +def test_deprecation_warning(): + with pytest.warns(DeprecationWarning): + import hdmf.monitor # noqa: F401