summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
authorMaksim Novikov <maksim.novikov@aiven.io>2021-12-02 15:02:43 +0100
committerGitHub <noreply@github.com>2021-12-02 16:02:43 +0200
commitd4a9825a72e1b7715d79ce8134e678d9ef537dce (patch)
tree713d5c211f70013811f6e2dfe9b434723beab2be /redis/connection.py
parent1a59a7a45feaed2bd0e33ccdbcd92cd305fd7e44 (diff)
downloadredis-py-d4a9825a72e1b7715d79ce8134e678d9ef537dce.tar.gz
Allow overriding connection class via keyword arguments (#1752)
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-xredis/connection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/redis/connection.py b/redis/connection.py
index d13fe65..2001c64 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -1131,6 +1131,10 @@ class ConnectionPool:
arguments always win.
"""
url_options = parse_url(url)
+
+ if "connection_class" in kwargs:
+ url_options["connection_class"] = kwargs["connection_class"]
+
kwargs.update(url_options)
return cls(**kwargs)