Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Support passing a specific connection class to StrictRedisCluster #243

Merged
merged 1 commit into from
Mar 3, 2018

Conversation

ilr39
Copy link

@ilr39 ilr39 commented Feb 28, 2018

This cannot be done by using kwargs because kwargs are later passed on to the super init(which is StrictRedis) and it doesn't support arbitrary kwargs, so it fails when trying to pass connection_class as named argument to StrictRedis constructor.

StrictRedis constructor:
def __init__(self, host='localhost', port=6379, db=0, password=None, socket_timeout=None, socket_connect_timeout=None, socket_keepalive=None, socket_keepalive_options=None, connection_pool=None, unix_socket_path=None, encoding='utf-8', encoding_errors='strict', charset=None, errors=None, decode_responses=False, retry_on_timeout=False, ssl=False, ssl_keyfile=None, ssl_certfile=None, ssl_cert_reqs=None, ssl_ca_certs=None, max_connections=None):

This doesn't break any interface.
I need this to use SSL connection class with my cluster connection.

…ch is later passed on to the connection pool
@coveralls
Copy link

coveralls commented Feb 28, 2018

Coverage Status

Coverage increased (+0.05%) to 86.239% when pulling 8e483b9 on ilr39:support-passing-connection-class into 8e547a2 on Grokzen:unstable.

@Grokzen Grokzen merged commit d7768a1 into Grokzen:unstable Mar 3, 2018
@Grokzen
Copy link
Owner

Grokzen commented Mar 3, 2018

@ilr39 Great find and thanks for the contribution

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants