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:
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,

@ -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)

@ -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

Loading…
Cancel
Save