From 766994d911c47008771b66c1e6c6e6459644075a Mon Sep 17 00:00:00 2001 From: Aaron Ayres Date: Mon, 16 Nov 2020 11:42:41 -0600 Subject: [PATCH 1/2] remove NullHandler and its import in api module --- apptools/logger/api.py | 1 - apptools/logger/null_handler.py | 39 --------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 apptools/logger/null_handler.py diff --git a/apptools/logger/api.py b/apptools/logger/api.py index 603c6d971..4e2093320 100644 --- a/apptools/logger/api.py +++ b/apptools/logger/api.py @@ -2,4 +2,3 @@ from .logger import FORMATTER, LEVEL, LogFileHandler from .log_point import log_point from .filtering_handler import FilteringHandler -from .null_handler import NullHandler diff --git a/apptools/logger/null_handler.py b/apptools/logger/null_handler.py deleted file mode 100644 index 14241b42a..000000000 --- a/apptools/logger/null_handler.py +++ /dev/null @@ -1,39 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) 2005, Enthought, Inc. -# All rights reserved. -# -# This software is provided without warranty under the terms of the BSD -# license included in enthought/LICENSE.txt and may be redistributed only -# under the conditions described in the aforementioned license. The license -# is also available online at http://www.enthought.com/licenses/BSD.txt -# Thanks for using Enthought open source! -# -# Author: Enthought, Inc. -# Description: -# ------------------------------------------------------------------------------ -""" A null log handler. """ - - -# Standard library imports. -import logging - - -class NullHandler(logging.Handler): - """A null log handler. - - This is a quick hack so that we can start to refactor the 'logger' - module since it used to add actual handlers at module load time. - - Now we only add this handler so that people using just the ETS library and - not one of our applications won't see the warning about 'no handlers'. - - """ - - ########################################################################### - # 'Handler' interface. - ########################################################################### - - def emit(self, record): - """ Emits a log record. """ - - pass From 64bbb669bdb1063d2eac5a9c2fb863e2df4f8c08 Mon Sep 17 00:00:00 2001 From: Aaron Ayres Date: Mon, 16 Nov 2020 11:49:44 -0600 Subject: [PATCH 2/2] add news fragment --- docs/releases/upcoming/216.removal.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/releases/upcoming/216.removal.rst diff --git a/docs/releases/upcoming/216.removal.rst b/docs/releases/upcoming/216.removal.rst new file mode 100644 index 000000000..19b0d26a4 --- /dev/null +++ b/docs/releases/upcoming/216.removal.rst @@ -0,0 +1 @@ +remove NullHandler from ``apptools.logger`` (#216) \ No newline at end of file