From 4d086ef0f453b59293f1a11b5f689104bbdcb80a Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 30 Oct 2018 18:53:00 -0700 Subject: [PATCH] Fix various mind-numbing typos --- src/python/grpcio/grpc/_channel.py | 2 +- src/python/grpcio/grpc/framework/foundation/stream_util.py | 2 +- src/python/grpcio_tests/tests/unit/_api_test.py | 1 + src/python/grpcio_tests/tests/unit/_auth_context_test.py | 1 + src/python/grpcio_tests/tests/unit/_auth_test.py | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index a65ddfcd829..6a71ef2b3bb 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -25,7 +25,7 @@ from grpc._cython import cygrpc from grpc.framework.foundation import callable_util _LOGGER = logging.getLogger(__name__) -_LOGGER.addHandler(logging.NullHandler) +_LOGGER.addHandler(logging.NullHandler()) _USER_AGENT = 'grpc-python/{}'.format(_grpcio_metadata.__version__) diff --git a/src/python/grpcio/grpc/framework/foundation/stream_util.py b/src/python/grpcio/grpc/framework/foundation/stream_util.py index df8c93d3e56..e03130cced7 100644 --- a/src/python/grpcio/grpc/framework/foundation/stream_util.py +++ b/src/python/grpcio/grpc/framework/foundation/stream_util.py @@ -20,7 +20,7 @@ from grpc.framework.foundation import stream _NO_VALUE = object() _LOGGER = logging.getLogger(__name__) -_LOGGER.addHandler(NullHandler()) +_LOGGER.addHandler(logging.NullHandler()) class TransformingConsumer(stream.Consumer): diff --git a/src/python/grpcio_tests/tests/unit/_api_test.py b/src/python/grpcio_tests/tests/unit/_api_test.py index 5dfb8b2b54d..38072861a49 100644 --- a/src/python/grpcio_tests/tests/unit/_api_test.py +++ b/src/python/grpcio_tests/tests/unit/_api_test.py @@ -14,6 +14,7 @@ """Test of gRPC Python's application-layer API.""" import unittest +import logging import six diff --git a/src/python/grpcio_tests/tests/unit/_auth_context_test.py b/src/python/grpcio_tests/tests/unit/_auth_context_test.py index 67f222d4b13..b1b5bbdcab3 100644 --- a/src/python/grpcio_tests/tests/unit/_auth_context_test.py +++ b/src/python/grpcio_tests/tests/unit/_auth_context_test.py @@ -15,6 +15,7 @@ import pickle import unittest +import logging import grpc from grpc import _channel diff --git a/src/python/grpcio_tests/tests/unit/_auth_test.py b/src/python/grpcio_tests/tests/unit/_auth_test.py index e125e775416..d9df2add4f2 100644 --- a/src/python/grpcio_tests/tests/unit/_auth_test.py +++ b/src/python/grpcio_tests/tests/unit/_auth_test.py @@ -16,6 +16,7 @@ import collections import threading import unittest +import logging from grpc import _auth