Remove unused loop parameter

pull/21455/head
Pau Freixes 5 years ago
parent db54580f20
commit 69884f7d84
  1. 4
      src/python/grpcio/grpc/experimental/aio/_channel.py
  2. 3
      src/python/grpcio/grpc/experimental/aio/_interceptor.py
  3. 4
      src/python/grpcio/grpc/experimental/aio/_utils.py

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

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

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

Loading…
Cancel
Save