kazoo
kazoo copied to clipboard
Client auth_data is a set, but documentation says it is a list
The comment for the auth_data parameter in KazooClient says:
A list of authentication credentials to use for the
connection. Should be a list of (scheme, credential)
tuples as :meth:`add_auth` takes.
but the the code treats it like a set later on by calling
self.auth_data = auth_data if auth_data else set([])
and
self.auth_data.add((scheme, credential))
This could be fixed by changing the comment to make it a set or the code could be changed to actually use a list. You could also support both by calling set(auth_data) so if it is a list it will be turned into a set and if it is already a set, then its a noop.