Skip to content

Restoring ZRANGE desc for Redis < 6.2.0 #1697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

AvitalFineRedis
Copy link
Contributor

@AvitalFineRedis AvitalFineRedis commented Nov 11, 2021

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

closes #1669

In the previous implementation of zrange, the user could use desc by calling to zrevrange behind the scene. Since redis 6.2.0, zrange supports REV label (and other new labels e.g LIMIT).
We want to be able to use desc without any other params (that will execute zrevrange), or to use desc with other new params, and then zrange will be called, but that can be done only when using redis > 6.2.0.

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2021

Codecov Report

Merging #1697 (5604573) into master (5be96b9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1697   +/-   ##
=======================================
  Coverage   92.21%   92.21%           
=======================================
  Files          53       53           
  Lines       11002    11005    +3     
=======================================
+ Hits        10145    10148    +3     
  Misses        857      857           
Impacted Files Coverage Δ
redis/commands/core.py 90.06% <100.00%> (+0.01%) ⬆️
tests/test_commands.py 99.80% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5be96b9...5604573. Read the comment docs.

@chayim chayim added the bug Bug label Nov 11, 2021
@chayim chayim changed the title Support desc in ZRANGE for 3.5.3 Restoring ZRANGE desc for Redis < 6.2.0 Nov 11, 2021
@chayim chayim merged commit ec172e7 into redis:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.0.0rc1 breaks various zrange commands on older servers
3 participants