Эх сурвалжийг харах

Remove unused loop parameter

Pau Freixes 5 жил өмнө
parent
commit
69884f7d84

+ 2 - 2
src/python/grpcio/grpc/experimental/aio/_channel.py

@@ -96,7 +96,7 @@ class UnaryUnaryMultiCallable:
         if not self._interceptors:
             return UnaryUnaryCall(
                 request,
-                _timeout_to_deadline(self._loop, timeout),
+                _timeout_to_deadline(timeout),
                 self._channel,
                 self._method,
                 self._request_serializer,
@@ -166,7 +166,7 @@ class UnaryStreamMultiCallable:
         if compression:
             raise NotImplementedError("TODO: compression not implemented yet")
 
-        deadline = _timeout_to_deadline(self._loop, timeout)
+        deadline = _timeout_to_deadline(timeout)
 
         return UnaryStreamCall(
             request,

+ 1 - 2
src/python/grpcio/grpc/experimental/aio/_interceptor.py

@@ -147,8 +147,7 @@ class InterceptedUnaryUnaryCall(_base_call.UnaryUnaryCall):
             else:
                 return UnaryUnaryCall(
                     request,
-                    _timeout_to_deadline(self._loop,
-                                         client_call_details.timeout),
+                    _timeout_to_deadline(client_call_details.timeout),
                     self._channel, client_call_details.method,
                     request_serializer, response_deserializer)
 

+ 1 - 3
src/python/grpcio/grpc/experimental/aio/_utils.py

@@ -12,13 +12,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 """Internal utilities used by the gRPC Aio module."""
-import asyncio
 import time
 from typing import Optional
 
 
-def _timeout_to_deadline(loop: asyncio.AbstractEventLoop,
-                         timeout: Optional[float]) -> Optional[float]:
+def _timeout_to_deadline(timeout: Optional[float]) -> Optional[float]:
     if timeout is None:
         return None
     return time.time() + timeout