diff options
author | Aarni Koskela <akx@iki.fi> | 2022-09-28 14:09:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 14:09:32 +0300 |
commit | 027abe524acd0aec24e92ea7eef328f983d5278c (patch) | |
tree | 7a8c6191b51b74ea829e6ca99c5c170cae5a2982 /redis/utils.py | |
parent | 947b8e8595e3aff4aeb3eb3ebbe56b86fb5e76fb (diff) | |
download | redis-py-027abe524acd0aec24e92ea7eef328f983d5278c.tar.gz |
Support Hiredis >= 1.x only (remove `packaging` dependency) (#2385)
* Only set HIREDIS_AVAILABLE if Hiredis is not 0.x
* Remove compatibility code for old Hiredis versions
* Move packaging dependency to dev only
Diffstat (limited to 'redis/utils.py')
-rw-r--r-- | redis/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redis/utils.py b/redis/utils.py index 0c34e1e..25d2491 100644 --- a/redis/utils.py +++ b/redis/utils.py @@ -4,7 +4,8 @@ from typing import Any, Dict, Mapping, Union try: import hiredis # noqa - HIREDIS_AVAILABLE = True + # Only support Hiredis >= 1.0: + HIREDIS_AVAILABLE = not hiredis.__version__.startswith("0.") except ImportError: HIREDIS_AVAILABLE = False |