@@ -93,7 +93,11 @@ class ClientSession:
9393 the coordinator."""
9494
9595 address = attr .ib (validator = attr .validators .instance_of (str ))
96- credentials = attr .ib (validator = attr .validators .optional (attr .validators .instance_of (grpc .ChannelCredentials )))
96+ credentials = attr .ib (
97+ default = None ,
98+ kw_only = True ,
99+ validator = attr .validators .optional (attr .validators .instance_of (grpc .ChannelCredentials )),
100+ )
97101 loop = attr .ib (validator = attr .validators .instance_of (asyncio .BaseEventLoop ))
98102 env = attr .ib (default = None , validator = attr .validators .optional (attr .validators .instance_of (Environment )))
99103 role = attr .ib (default = None , validator = attr .validators .optional (attr .validators .instance_of (str )))
@@ -1721,6 +1725,8 @@ def start_session(
17211725 Args:
17221726 address: coordinator address as HOST[:PORT], PORT defaults to 20408
17231727 extra: additional kwargs for ClientSession
1728+ credentials: optional gRPC channel credentials; when None, use an
1729+ insecure channel
17241730 debug: set debug mode of the event loop
17251731 loop: explicit event loop to use (otherwise a previously stashed loop,
17261732 if retrievable the current thread's loop or a new loop is used)
@@ -1735,7 +1741,7 @@ def start_session(
17351741
17361742 address = proxymanager .get_grpc_address (address , default_port = 20408 )
17371743
1738- session = ClientSession (address , credentials , loop , ** extra )
1744+ session = ClientSession (address , loop , credentials = credentials , ** extra )
17391745 loop .run_until_complete (session .start ())
17401746 return session
17411747
0 commit comments