Skip to content
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

support for redis-py version 3 #114

Open
em92 opened this issue Dec 12, 2022 · 1 comment
Open

support for redis-py version 3 #114

em92 opened this issue Dec 12, 2022 · 1 comment

Comments

@em92
Copy link
Collaborator

em92 commented Dec 12, 2022

As for now, at least official ban plugin is stuck at redis-py 2.
Using redis-py 3 raises this exception:
https://gist.github.com/lonewulfa/178842cc31276270548c5ad5060399c1

Breaking changes: https://github.com/redis/redis-py/blob/3a121bef7bbc5bb5f07b119b0eef2f7527a38eda/CHANGES#L539-L570

Probably good idea is adding compatibilty layer in minqlx itself.

@mgaertne
Copy link
Contributor

Redis3 had an upgrade description: https://pypi.org/project/redis3/

Mainly this affects redis.zadd and redis.zincrby calls. Backward compability would be useful as well. I mainly solved this in existing plugins with:

        if redis.VERSION >= (3, ):
            # redis 3 calls
        else:
            # redis 2 calls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants