summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authorSergey Prokazov <prokazov@users.noreply.github.com>2023-02-08 06:18:49 -0600
committerGitHub <noreply@github.com>2023-02-08 14:18:49 +0200
commit2b470cb76534eca04e181e1877a0674032f7e82a (patch)
tree8cdb8c1ce1c22fd135c8ed47efe6e26d53d4172a /redis
parent5cb5712d283fa8fb300abc9d71a61c1a81de5643 (diff)
downloadredis-py-2b470cb76534eca04e181e1877a0674032f7e82a.tar.gz
Fix #2581 UnixDomainSocketConnection' object has no attribute '_command_packer' (#2583)
* Fix #2581 UnixDomainSocketConnection' object has no attribute '_command_packer' . Apparently there is no end-to-end tests for Unix sockets so automation didn't catch it. I assume that setting up domain sockets reliably in dockerized environment is not very trivial. Added test for pack_command specifically. * Figuring out why CI fails. Locally: " congratulations :)" * Fix the test. hiredis doesn't treat memoryviews differently.
Diffstat (limited to 'redis')
-rw-r--r--redis/connection.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 2461482..d35980c 100644
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -1153,6 +1153,7 @@ class UnixDomainSocketConnection(Connection):
retry=None,
redis_connect_func=None,
credential_provider: Optional[CredentialProvider] = None,
+ command_packer=None,
):
"""
Initialize a new UnixDomainSocketConnection.
@@ -1202,6 +1203,7 @@ class UnixDomainSocketConnection(Connection):
self.set_parser(parser_class)
self._connect_callbacks = []
self._buffer_cutoff = 6000
+ self._command_packer = self._construct_command_packer(command_packer)
def repr_pieces(self):
pieces = [("path", self.path), ("db", self.db)]