diff --git a/pyproject.toml b/pyproject.toml index d6eae5238b83..674659cf8197 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ flower-client-app = "flwr.client.supernode:run_client_app" # Deprecated python = "^3.9" # Mandatory dependencies numpy = ">=1.26.0,<3.0.0" -grpcio = "^1.60.0,!=1.64.2,<=1.64.3" +grpcio = "^1.69.0" protobuf = "^4.25.2" cryptography = "^42.0.4" pycryptodome = "^3.18.0" diff --git a/src/py/flwr/client/grpc_client/connection.py b/src/py/flwr/client/grpc_client/connection.py index 2c855a65ce12..ccedc0a996f1 100644 --- a/src/py/flwr/client/grpc_client/connection.py +++ b/src/py/flwr/client/grpc_client/connection.py @@ -47,12 +47,6 @@ ) from flwr.proto.transport_pb2_grpc import FlowerServiceStub # pylint: disable=E0611 -# The following flags can be uncommented for debugging. Other possible values: -# https://github.com/grpc/grpc/blob/master/doc/environment_variables.md -# import os -# os.environ["GRPC_VERBOSITY"] = "debug" -# os.environ["GRPC_TRACE"] = "tcp,http" - def on_channel_state_change(channel_connectivity: str) -> None: """Log channel connectivity.""" diff --git a/src/py/flwr/common/grpc.py b/src/py/flwr/common/grpc.py index 5fc96d8666b4..8c2801b818b1 100644 --- a/src/py/flwr/common/grpc.py +++ b/src/py/flwr/common/grpc.py @@ -16,6 +16,7 @@ import concurrent.futures +import os import sys from collections.abc import Sequence from logging import DEBUG, ERROR @@ -35,6 +36,12 @@ AddServicerToServerFn = Callable[..., Any] +if "GRPC_VERBOSITY" not in os.environ: + os.environ["GRPC_VERBOSITY"] = "error" +# The following flags can be uncommented for debugging. Other possible values: +# https://github.com/grpc/grpc/blob/master/doc/environment_variables.md +# os.environ["GRPC_TRACE"] = "tcp,http" + def create_channel( server_address: str,