From 16cfcc7fced84d2b53edf95af1c40b230b30fc3d Mon Sep 17 00:00:00 2001 From: adiamzn <92513900+adiamzn@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:14:49 +0300 Subject: Add warning when hiredis not installed. Recommend installation. (#1621) --- redis/connection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redis/connection.py b/redis/connection.py index c2fb84f..c99c550 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -71,6 +71,9 @@ if HIREDIS_AVAILABLE: # 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'$' -- cgit v1.2.1