Clean-up loggers and imports in Cython

pull/21672/head
Lidi Zheng 5 years ago
parent 56972ae715
commit cdade7c450
  1. 3
      src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi
  2. 2
      src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
  3. 2
      src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi
  4. 2
      src/python/grpcio/grpc/_cython/_cygrpc/arguments.pyx.pxi
  5. 2
      src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
  6. 4
      src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
  7. 4
      src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
  8. 5
      src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
  9. 5
      src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
  10. 2
      src/python/grpcio/grpc/_cython/_cygrpc/fork_windows.pyx.pxi
  11. 1
      src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pyx.pxi
  12. 3
      src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
  13. 8
      src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
  14. 2
      src/python/grpcio/grpc/_cython/cygrpc.pxd
  15. 11
      src/python/grpcio/grpc/_cython/cygrpc.pyx

@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
import grpc
_EMPTY_FLAGS = 0
_EMPTY_MASK = 0

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
cdef class CallbackFailureHandler:
cdef str _core_function_name

@ -17,8 +17,6 @@ import inspect
import traceback
# TODO(https://github.com/grpc/grpc/issues/20850) refactor this.
_LOGGER = logging.getLogger(__name__)
cdef int _EMPTY_FLAG = 0

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
cdef class _GrpcArgWrapper:

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
cdef class Call:

@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
import threading
import time
_INTERNAL_CALL_ERROR_MESSAGE_FORMAT = (
'Internal gRPC call error %d. ' +

@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
import threading
import time
cdef int _INTERRUPT_CHECK_PERIOD_MS = 200

@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
import grpc
import threading
def _spawn_callback_in_thread(cb_func, args):
ForkManagedThread(target=cb_func, args=args).start()

@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
import os
import threading
_LOGGER = logging.getLogger(__name__)
_AWAIT_THREADS_TIMEOUT_SECONDS = 5

@ -13,8 +13,6 @@
# limitations under the License.
import threading
# No-op implementations for Windows.
def fork_handlers_and_grpc_init():

@ -13,7 +13,6 @@
# limitations under the License.
# distutils: language=c++
cimport cpython
from libc cimport string
import errno
gevent_g = None

@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
_LOGGER = logging.getLogger(__name__)
# This function will ascii encode unicode string inputs if necessary.
# In Python3, unicode strings are the default str type.

@ -12,14 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cimport cpython
import logging
import time
import grpc
_LOGGER = logging.getLogger(__name__)
cdef class Server:

@ -13,6 +13,8 @@
# limitations under the License.
# distutils: language=c++
cimport cpython
include "_cygrpc/grpc.pxi"
include "_cygrpc/arguments.pxd.pxi"

@ -15,8 +15,14 @@
cimport cpython
import os.path
import logging
import os
import sys
import threading
import time
import grpc
try:
import asyncio
except ImportError:
@ -25,6 +31,9 @@ except ImportError:
# Asyncio package is not available we just skip it.
pass
# The only copy of Python logger for the Cython extension
_LOGGER = logging.getLogger(__name__)
# TODO(atash): figure out why the coverage tool gets confused about the Cython
# coverage plugin when the following files don't have a '.pxi' suffix.
include "_cygrpc/grpc_string.pyx.pxi"

Loading…
Cancel
Save