The constructor of _ClusterServerClient calls _ClusterServerClient.new_channel_and_stub() during creation of the channel and the gRPC _stub of a server client (L36),
which calls _ClusterServerClient._new_channel() (L49),
which references a yet-not-created self._stub in a lambda that it passes to grpc.metadata_call_credentials() (L60),
which, if it calls the lambda at that point, correctly raises AttributeError: '_ClusterServerClient' object has no attribute '_stub'.
Description
Potential circular dependency in https://github.com/vaticle/typedb-client-python/blob/master/typedb/connection/cluster/server_client.py.
The constructor of
_ClusterServerClient
calls_ClusterServerClient.new_channel_and_stub()
during creation of the channel and the gRPC_stub
of a server client (L36), which calls_ClusterServerClient._new_channel()
(L49), which references a yet-not-createdself._stub
in a lambda that it passes togrpc.metadata_call_credentials()
(L60), which, if it calls the lambda at that point, correctly raisesAttributeError: '_ClusterServerClient' object has no attribute '_stub'
.