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

Not able to use hiredis with redis-py for server-assisted client-side caching #3358

Open
mahudees opened this issue Aug 20, 2024 · 4 comments

Comments

@mahudees
Copy link

Version: redis-py - 5.1.0b7, hiredis - 3.0.0

Platform: Python 3.9 in MacBook Apple M3 Pro

Description:
Trying server-assisted client-side caching with redis-py version 5.1.0b7, it worked fine without hredis. Tried with hiredis for additional performance, getting the following error once hiredis is installed and ran the script.
Does it require any additional change, from this https://redis.io/docs/latest/develop/connect/clients/python/redis-py/ came to know no additional changes is required for most of the cases.

/Users/mahudees/PycharmProjects/redis-client/.venv/bin/python /Users/mahudees/PycharmProjects/rsacsc-py-master/pythoncsc/csc.py
Traceback (most recent call last):
File "/Users/mahudees/PycharmProjects/rsacsc-py-master/pythoncsc/csc.py", line 129, in
r.set("foo", "bar")
File "/Users/mahudees/PycharmProjects/redis-client/.venv/lib/python3.9/site-packages/redis/commands/core.py", line 2334, in set
return self.execute_command("SET", *pieces, **options)
File "/Users/mahudees/PycharmProjects/redis-client/.venv/lib/python3.9/site-packages/redis/client.py", line 566, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/Users/mahudees/PycharmProjects/redis-client/.venv/lib/python3.9/site-packages/redis/connection.py", line 1200, in get_connection
connection.connect()
File "/Users/mahudees/PycharmProjects/redis-client/.venv/lib/python3.9/site-packages/redis/connection.py", line 315, in connect
self.on_connect()
File "/Users/mahudees/PycharmProjects/redis-client/.venv/lib/python3.9/site-packages/redis/connection.py", line 439, in on_connect
self._parser.set_invalidation_push_handler(self._cache_invalidation_process)
AttributeError: '_HiredisParser' object has no attribute 'set_invalidation_push_handler'

Process finished with exit code 1

@kosuke-zhang
Copy link
Contributor

#3324 hasn't release yet.

@mahudees
Copy link
Author

Thanks for the reply, when can we expect it to be released.

@akx
Copy link
Contributor

akx commented Aug 27, 2024

No one knows. For the time being, use hiredis<3.0.

@mahudees
Copy link
Author

mahudees commented Sep 1, 2024

Ok sure, Thank you.

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

3 participants