소스 검색

Fix the error on mac and win && make pytype happy

Lidi Zheng 5 년 전
부모
커밋
d40c1b8408
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 1
      src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi
  2. 1 1
      src/python/grpcio_tests/tests_aio/unit/compatibility_test.py

+ 2 - 1
src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi

@@ -962,4 +962,5 @@ cdef class AioServer:
         if self._thread_pool:
             return self._thread_pool
         else:
-            raise UsageError('Please provide an Executor upon server creation.')
+            # Use the event loop's default executor
+            return None

+ 1 - 1
src/python/grpcio_tests/tests_aio/unit/compatibility_test.py

@@ -51,7 +51,7 @@ class _AdhocGenericHandler(grpc.GenericRpcHandler):
     def set_adhoc_handler(self, handler: grpc.RpcMethodHandler):
         self._handler = handler
 
-    def service(self, handler_call_details: grpc.HandlerCallDetails):
+    def service(self, handler_call_details):
         if handler_call_details.method == _ADHOC_METHOD:
             return self._handler
         else: