diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2020-01-31 12:18:12 -0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2020-01-31 12:18:12 -0800 |
commit | e39ae455dfa259cdbb0c1cee2e4cb50c17ee22bf (patch) | |
tree | 342683bbb84d6d55c54bc166cae1dac82becf8a1 /redis/__init__.py | |
parent | ab1c659aaac8a59c4e4055e1598920706192fa42 (diff) | |
download | redis-py-e39ae455dfa259cdbb0c1cee2e4cb50c17ee22bf.tar.gz |
Provide AUTH fallback support for connection URLs with a username component
Prior to ACL support, redis-py ignored the username component of
Connection URLs. With ACL support, usernames are no longer ignored and
are used to authenticate against an ACL rule. Some cloud vendors with
managed Redis instances (like Heroku) provide connection URLs with a
username component pre-ACL that is not intended to be used. Sending that
username to Redis servers < 6.0.0 results in an error. Attempt to detect
this condition and retry the AUTH command with only the password such
that authentication continues to work for these users.
Fixes #1274
Diffstat (limited to 'redis/__init__.py')
-rw-r--r-- | redis/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/redis/__init__.py b/redis/__init__.py index 369d39e..57deb86 100644 --- a/redis/__init__.py +++ b/redis/__init__.py @@ -9,6 +9,7 @@ from redis.connection import ( from redis.utils import from_url from redis.exceptions import ( AuthenticationError, + AuthenticationWrongNumberOfArgsError, BusyLoadingError, ChildDeadlockedError, ConnectionError, @@ -35,6 +36,7 @@ VERSION = tuple(map(int_or_str, __version__.split('.'))) __all__ = [ 'AuthenticationError', + 'AuthenticationWrongNumberOfArgsError', 'BlockingConnectionPool', 'BusyLoadingError', 'ChildDeadlockedError', |