From fa76ac49a9ea02c204bd4f1644f39d90140cf356 Mon Sep 17 00:00:00 2001 From: dvora-h <67596500+dvora-h@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:11:55 +0200 Subject: Add support for Redis 7 functions (#1998) * add function support * linters * test fcall * decode reponses for unstable_r * linters * fix evalsho_ro test * fix eval_ro test * add response callbaks * linters --- redis/connection.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'redis/connection.py') diff --git a/redis/connection.py b/redis/connection.py index 891695d..189cecb 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -463,10 +463,17 @@ class HiredisParser(BaseParser): self._next_response = False return response - response = self._reader.gets() + if disable_decoding: + response = self._reader.gets(False) + else: + response = self._reader.gets() + while response is False: self.read_from_socket() - response = self._reader.gets() + if disable_decoding: + response = self._reader.gets(False) + else: + response = self._reader.gets() # if an older version of hiredis is installed, we need to attempt # to convert ResponseErrors to their appropriate types. if not HIREDIS_SUPPORTS_CALLABLE_ERRORS: -- cgit v1.2.1