Skip to content

Commit

Permalink
De-experimentalize compression (#32138)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnossen authored and wanlin31 committed May 18, 2023
1 parent 1aa98de commit b84f020
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 30 deletions.
30 changes: 12 additions & 18 deletions src/python/grpcio/grpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class ClientCallDetails(abc.ABC):
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
"""


Expand Down Expand Up @@ -683,7 +683,7 @@ def __call__(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
The response value for the RPC.
Expand Down Expand Up @@ -716,7 +716,7 @@ def with_call(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
The response value for the RPC and a Call value for the RPC.
Expand Down Expand Up @@ -749,7 +749,7 @@ def future(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
An object that is both a Call for the RPC and a Future.
Expand Down Expand Up @@ -785,7 +785,7 @@ def __call__(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
An object that is a Call for the RPC, an iterator of response
Expand Down Expand Up @@ -821,7 +821,7 @@ def __call__(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
The response value for the RPC.
Expand Down Expand Up @@ -855,7 +855,7 @@ def with_call(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
The response value for the RPC and a Call object for the RPC.
Expand Down Expand Up @@ -888,7 +888,7 @@ def future(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
An object that is both a Call for the RPC and a Future.
Expand Down Expand Up @@ -924,7 +924,7 @@ def __call__(self,
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
An object that is a Call for the RPC, an iterator of response
Expand Down Expand Up @@ -1139,8 +1139,6 @@ def auth_context(self):
def set_compression(self, compression):
"""Set the compression algorithm to be used for the entire call.
This is an EXPERIMENTAL method.
Args:
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip.
Expand Down Expand Up @@ -1273,8 +1271,6 @@ def details(self):
def disable_next_message_compression(self):
"""Disables compression for the next response message.
This is an EXPERIMENTAL method.
This method will override any compression configuration set during
server creation or set on the call.
"""
Expand Down Expand Up @@ -1968,7 +1964,7 @@ def insecure_channel(target, options=None, compression=None):
options: An optional list of key-value pairs (:term:`channel_arguments`
in gRPC Core runtime) to configure the channel.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel. This is an EXPERIMENTAL option.
used over the lifetime of the channel.
Returns:
A Channel.
Expand All @@ -1989,7 +1985,7 @@ def secure_channel(target, credentials, options=None, compression=None):
options: An optional list of key-value pairs (:term:`channel_arguments`
in gRPC Core runtime) to configure the channel.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel. This is an EXPERIMENTAL option.
used over the lifetime of the channel.
Returns:
A Channel.
Expand Down Expand Up @@ -2056,7 +2052,7 @@ def server(thread_pool,
indicate no limit.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This compression algorithm will be used for the
lifetime of the server unless overridden. This is an EXPERIMENTAL option.
lifetime of the server unless overridden.
xds: If set to true, retrieves server configuration via xDS. This is an
EXPERIMENTAL option.
Expand All @@ -2083,8 +2079,6 @@ def _create_servicer_context(rpc_event, state, request_deserializer):
class Compression(enum.IntEnum):
"""Indicates the compression method to be used for an RPC.
This enumeration is part of an EXPERIMENTAL API.
Attributes:
NoCompression: Do not use compression algorithm.
Deflate: Use "Deflate" compression algorithm.
Expand Down
8 changes: 4 additions & 4 deletions src/python/grpcio/grpc/aio/_base_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __call__(
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
A UnaryUnaryCall object.
Expand Down Expand Up @@ -91,7 +91,7 @@ def __call__(
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
A UnaryStreamCall object.
Expand Down Expand Up @@ -130,7 +130,7 @@ def __call__(
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
A StreamUnaryCall object.
Expand Down Expand Up @@ -169,7 +169,7 @@ def __call__(
wait_for_ready: This is an EXPERIMENTAL argument. An optional
flag to enable :term:`wait_for_ready` mechanism.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This is an EXPERIMENTAL option.
grpc.compression.Gzip.
Returns:
A StreamStreamCall object.
Expand Down
4 changes: 0 additions & 4 deletions src/python/grpcio/grpc/aio/_base_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ def set_details(self, details: str) -> None:
def set_compression(self, compression: grpc.Compression) -> None:
"""Set the compression algorithm to be used for the entire call.
This is an EXPERIMENTAL method.
Args:
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip.
Expand All @@ -254,8 +252,6 @@ def set_compression(self, compression: grpc.Compression) -> None:
def disable_next_message_compression(self) -> None:
"""Disables compression for the next response message.
This is an EXPERIMENTAL method.
This method will override any compression configuration set during
server creation or set on the call.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/python/grpcio/grpc/aio/_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def insecure_channel(
options: An optional list of key-value pairs (:term:`channel_arguments`
in gRPC Core runtime) to configure the channel.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel. This is an EXPERIMENTAL option.
used over the lifetime of the channel.
interceptors: An optional sequence of interceptors that will be executed for
any call executed with this channel.
Expand All @@ -481,7 +481,7 @@ def secure_channel(target: str,
options: An optional list of key-value pairs (:term:`channel_arguments`
in gRPC Core runtime) to configure the channel.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel. This is an EXPERIMENTAL option.
used over the lifetime of the channel.
interceptors: An optional sequence of interceptors that will be executed for
any call executed with this channel.
Expand Down
3 changes: 1 addition & 2 deletions src/python/grpcio/grpc/aio/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ def server(migration_thread_pool: Optional[Executor] = None,
indicate no limit.
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This compression algorithm will be used for the
lifetime of the server unless overridden by set_compression. This is an
EXPERIMENTAL option.
lifetime of the server unless overridden by set_compression.
Returns:
A Server object.
Expand Down

0 comments on commit b84f020

Please sign in to comment.