cunla / fakeredis-py

Implementation of Redis in python without having a Redis server running. Fully compatible with using redis-py.
https://fakeredis.moransoftware.ca/
BSD 3-Clause "New" or "Revised" License
285 stars 49 forks source link

Support for ZRANGE command with BYLEX arg #123

Closed kchonka closed 1 year ago

kchonka commented 1 year ago

It looks like there is support for ZRANGE https://redis.io/commands/zrange/, but not with the BYLEX=True arg. What I'm trying to do is use ZRANGE by lex where start & stop are strings. I'm getting this error:

  File "/Users/kchonka/.pyenv/versions/new-test-lti1p3/lib/python3.9/site-packages/fakeredis/_server.py", line 82, in read_response
    raise response
redis.exceptions.ResponseError: min or max is not a float

On version 2.7.1

kchonka commented 1 year ago

I see there is support for ZRANGEBYLEX, but as of v6.2.0, this is deprecated and replaced with ZRANGE + BYLEX https://redis.io/commands/zrangebylex/

cunla commented 1 year ago

@kchonka, when would you be publish a PR for this?