Description
Version: redis-py 4.0.0rc1, redis 6.0.16 (or any less than 6.2).
Platform: Python 3.8, Ubuntu 20.04
Description:
Previously calling zrevrange
or zrange(..., desc=True)
would use ZREVRANGE on the wire. Somewhere between 4.0.0b1 and 4.0.0rc1 this changed to use ZRANGE ... REV
, which is new syntax in Redis 6.2. When using an older server this causes a syntax error.
To reproduce:
import redis
r = redis.Redis('localhost')
r.zrevrange('foo', 0, -1)
Other commands are also affected e.g. zrangebyscore and zrangebylex are also using ZRANGE with options on the wire which is not supported pre-6.2.