Merge pull request #17724 from ericgribkoff/rename_context_hooks

rename census context hooks
reviewable/pr17880/r1
Eric Gribkoff 6 years ago committed by GitHub
commit 196889cdad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/python/grpcio/grpc/_channel.py
  2. 4
      src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pyx.pxi
  3. 4
      src/python/grpcio/grpc/_server.py

@ -498,7 +498,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
self._method = method
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_context()
self._context = cygrpc.build_census_context()
def _prepare(self, request, timeout, metadata, wait_for_ready):
deadline, serialized_request, rendezvous = _start_unary_request(
@ -589,7 +589,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
self._method = method
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_context()
self._context = cygrpc.build_census_context()
def __call__(self,
request,
@ -636,7 +636,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
self._method = method
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_context()
self._context = cygrpc.build_census_context()
def _blocking(self, request_iterator, timeout, metadata, credentials,
wait_for_ready):
@ -713,7 +713,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
self._method = method
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_context()
self._context = cygrpc.build_census_context()
def __call__(self,
request_iterator,

@ -16,13 +16,13 @@
cdef object _custom_op_on_c_call(int op, grpc_call *call):
raise NotImplementedError("No custom hooks are implemented")
def install_census_context_from_call(Call call):
def install_context_from_call(Call call):
pass
def uninstall_context():
pass
def build_context():
def build_census_context():
pass
cdef class CensusContext:

@ -483,7 +483,7 @@ def _status(rpc_event, state, serialized_response):
def _unary_response_in_pool(rpc_event, state, behavior, argument_thunk,
request_deserializer, response_serializer):
cygrpc.install_census_context_from_call(rpc_event.call)
cygrpc.install_context_from_call(rpc_event.call)
try:
argument = argument_thunk()
if argument is not None:
@ -500,7 +500,7 @@ def _unary_response_in_pool(rpc_event, state, behavior, argument_thunk,
def _stream_response_in_pool(rpc_event, state, behavior, argument_thunk,
request_deserializer, response_serializer):
cygrpc.install_census_context_from_call(rpc_event.call)
cygrpc.install_context_from_call(rpc_event.call)
try:
argument = argument_thunk()
if argument is not None:

Loading…
Cancel
Save