Skip to content

Commit 16cfcc7

Browse files
authored
Add warning when hiredis not installed. Recommend installation. (#1621)
1 parent 2d18a05 commit 16cfcc7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

redis/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
# only use byte buffer if hiredis supports it
7272
if not HIREDIS_SUPPORTS_BYTE_BUFFER:
7373
HIREDIS_USE_BYTE_BUFFER = False
74+
else:
75+
msg = "redis-py works best with hiredis. Please consider installing"
76+
warnings.warn(msg)
7477

7578
SYM_STAR = b'*'
7679
SYM_DOLLAR = b'$'

0 commit comments

Comments
 (0)