[chore] Remove redundant imports

This also removes the historical patch for NullHandler implemented in bbf1c54, as it has been available since Python 3.1.
This commit is contained in:
Nadir Chowdhury
2020-11-28 08:16:49 +00:00
committed by GitHub
parent 0c69c99785
commit 6b803acde4
10 changed files with 6 additions and 22 deletions

View File

@ -64,11 +64,4 @@ VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial')
version_info = VersionInfo(major=1, minor=6, micro=0, releaselevel='alpha', serial=0)
try:
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getLogger(__name__).addHandler(NullHandler())
logging.getLogger(__name__).addHandler(logging.NullHandler())