From 356ff1eed182c5caba303650cb87d35959f62656 Mon Sep 17 00:00:00 2001 From: Adi Date: Sun, 17 Oct 2021 09:07:05 +0000 Subject: [PATCH] Add warning when hiredis not installed. Recommend installation. --- redis/connection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redis/connection.py b/redis/connection.py index 5528589026..66538e572f 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -71,6 +71,9 @@ # only use byte buffer if hiredis supports it if not HIREDIS_SUPPORTS_BYTE_BUFFER: HIREDIS_USE_BYTE_BUFFER = False +else: + msg = "redis-py works best with hiredis. Please consider installing" + warnings.warn(msg) SYM_STAR = b'*' SYM_DOLLAR = b'$'