Skip to content

Commit

Permalink
Deprecate monitor.py (#1245)
Browse files Browse the repository at this point in the history
* Add DeprecationWarning to monitor.py

* Fix syntax

* Add warning test

* Update changelog
  • Loading branch information
rly authored Feb 16, 2025
1 parent 493e130 commit 4d42540
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/hdmf/monitor.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_monitor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pytest


def test_deprecation_warning():
with pytest.warns(DeprecationWarning):
import hdmf.monitor # noqa: F401

0 comments on commit 4d42540

Please sign in to comment.