-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Support RESP3 with hiredis-py parser #3648
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 RESP3 with hiredis-py parser #3648
Conversation
…tion messages when using connection pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances RESP3 support by integrating a custom hiredis-py parser and aligning the code and tests with the new RESP3 push notification handling. Key changes include:
- Removing skipif conditions for HIREDIS_AVAILABLE from multiple test suites.
- Updating the HIREDIS_AVAILABLE version check logic to require hiredis ≥3.2.0.
- Modifying both synchronous and asynchronous RESP3/hiredis parser implementations to handle push notifications without relying on HIREDIS_AVAILABLE.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/test_search.py | Adds ResponseError handling in waitForIndex. |
tests/test_pubsub.py | Removes skipif markers for hiredis in pubsub tests. |
tests/test_connection_pool.py | Removes skipif markers for hiredis in connection pool tests. |
tests/test_cache.py | Removes skipif markers for hiredis in cache tests. |
tests/test_asyncio/test_search.py | Adds ResponseError handling for async waitForIndex. |
tests/test_asyncio/test_pubsub.py | Removes skipif markers for hiredis in async pubsub tests. |
redis/utils.py | Updates HIREDIS_AVAILABLE version check logic. |
redis/connection.py | Removes HIREDIS_AVAILABLE check for protocol 3 push handler. |
redis/cluster.py | Simplifies push handler condition in cluster executions. |
redis/client.py | Removes HIREDIS_AVAILABLE check for setting pubsub push handler. |
redis/asyncio/connection.py | Removes HIREDIS_AVAILABLE check in async read_response. |
redis/asyncio/client.py | Removes HIREDIS_AVAILABLE check for async pubsub push handler. |
redis/_parsers/resp3.py | Refactors push response handling by removing extraneous parameters. |
redis/_parsers/hiredis.py | Implements async and sync push response handling with logging. |
redis/_parsers/base.py | Adds PushNotificationsParser and AsyncPushNotificationsParser interfaces. |
redis/_parsers/init.py | Updates exported parser names to include push notifications support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
* Add minimalistic implementation for Push notifications parsing with hiredis-py * Fixing linters(almost all errors). Fixing hiredis parser for invalidation messages when using connection pool. * Fixing last linter errors. Fixes needed for pubsub message handling with hiredis. * Fix handle_pubsub_push_response * Update redis/utils.py Co-authored-by: Copilot <[email protected]> * Fix formatting * Some good sleep solves a lot of problems. Isn't it? * Enable verbose output from pytest to check why tests are skipped * Revert * Bump hiredis version to 3.2.0 * Bump hiredis-py version in CI --------- Co-authored-by: Petya Slavova <[email protected]> Co-authored-by: Copilot <[email protected]>
* Add minimalistic implementation for Push notifications parsing with hiredis-py * Fixing linters(almost all errors). Fixing hiredis parser for invalidation messages when using connection pool. * Fixing last linter errors. Fixes needed for pubsub message handling with hiredis. * Fix handle_pubsub_push_response * Update redis/utils.py Co-authored-by: Copilot <[email protected]> * Fix formatting * Some good sleep solves a lot of problems. Isn't it? * Enable verbose output from pytest to check why tests are skipped * Revert * Bump hiredis version to 3.2.0 * Bump hiredis-py version in CI --------- Co-authored-by: Petya Slavova <[email protected]> Co-authored-by: Copilot <[email protected]>
Fixes #3358
Requires hiredis-py 3.2.0