Skip to content

Commit 01e768b

Browse files
committed
Remove git.util.NullHandler
git.util has an __all__ attribute, which does not list NullHandler. As NullHandler is not otherwise documented to be public, removing it is not a breaking change, and there is no need for a deprecation period or to wait until the next major version of GitPython. See 741dfd3 for information about its history.
1 parent 741dfd3 commit 01e768b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Diff for: git/util.py

-20
Original file line numberDiff line numberDiff line change
@@ -1292,23 +1292,3 @@ def list_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> Any:
12921292

12931293

12941294
# } END classes
1295-
1296-
1297-
class NullHandler(logging.Handler):
1298-
"""Deprecated, use :class:`logging.NullHandler` instead.
1299-
1300-
This noop handler is like :class:`~logging.NullHandler` in the standard library,
1301-
which should be used instead, because it is now always available, and it overrides
1302-
more logging methods to make them noop. This class only overrides :meth:`emit`.
1303-
"""
1304-
1305-
def __init__(self, level: int = logging.NOTSET) -> None:
1306-
warnings.warn(
1307-
"NullHandler in git.util is deprecated. Use logging.NullHandler instead.",
1308-
DeprecationWarning,
1309-
stacklevel=2,
1310-
)
1311-
super().__init__(level)
1312-
1313-
def emit(self, record: logging.LogRecord) -> None:
1314-
pass

0 commit comments

Comments
 (0)