diff --git a/setup.cfg b/setup.cfg index e8ab541f..ed9ca8f9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,7 +53,7 @@ etcd3gw = zake = zake>=0.1.6 # Apache-2.0 redis = - redis>=3.1.0 # MIT + redis>=3.4.0 # MIT postgresql = psycopg2>=2.5 # LGPL/ZPL mysql = diff --git a/tooz/drivers/redis.py b/tooz/drivers/redis.py index 9b2ef031..51dbf080 100644 --- a/tooz/drivers/redis.py +++ b/tooz/drivers/redis.py @@ -159,7 +159,8 @@ class RedisDriver(coordination.CoordinationDriverCachedRunWatchers, The Redis driver connection URI should look like:: - redis://[:PASSWORD@]HOST:PORT[?OPTION=VALUE[&OPTION2=VALUE2[&...]]] + redis://[USERNAME:PASSWORD@]HOST:PORT + [?OPTION=VALUE[&OPTION2=VALUE2[&...]]] For a list of options recognized by this driver, see the documentation for the member CLIENT_ARGS, and to determine the expected types of those @@ -428,6 +429,8 @@ return 1 if not parsed_url.path: raise ValueError("Expected socket path in parsed urls path") kwargs['unix_socket_path'] = parsed_url.path + if parsed_url.username: + kwargs['username'] = parsed_url.username if parsed_url.password: kwargs['password'] = parsed_url.password for a in cls.CLIENT_ARGS: