-
Notifications
You must be signed in to change notification settings - Fork 12
DX-2186: Add Redis stream commands #66
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
Conversation
todo: fix skipped tests, improve response formating
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
Adds Redis Streams support to the SDK, including sync/async command implementations, response formatters, type stubs, documentation, and tests. Also bumps the package version.
- Implements XADD, XACK, XDEL, XGROUP, XINFO, XLEN, XPENDING, XRANGE, XREAD, XREADGROUP, XREVRANGE, XTRIM, XCLAIM, XAUTOCLAIM in commands.py
- Adds response formatters and registers stream commands in format.py
- Introduces extensive sync/async tests and updates README; bumps version to 1.5.0
Reviewed Changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| upstash_redis/commands.py | Adds full Redis Streams command implementations (sync) |
| upstash_redis/commands.pyi | Adds type stubs for new stream commands (sync/async) |
| upstash_redis/format.py | Adds formatters and registers stream response handlers |
| tests/... (multiple) | Adds comprehensive sync/async tests for all stream commands |
| README.md | Documents Streams usage (sync and async) |
| upstash_redis/init.py | Bumps version to 1.5.0 |
| pyproject.toml | Bumps package version to 1.5.0 |
| tests/commands/asyncio/scripting/test_evalsha_ro.py | Uses client’s script_load for consistency |
| .github/instructions/project-layout.instructions.md | Adds internal contributor guide for adding commands |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
upstash_redis/format.py
Outdated
| "XGROUP DESTROY": to_bool, | ||
| "XGROUP CREATECONSUMER": to_bool, | ||
| "XGROUP DELCONSUMER": to_bool, | ||
| "XGROUP SETID": ok_to_bool, |
Copilot
AI
Oct 18, 2025
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.
The formatter converts the "OK" response for XGROUP CREATE and XGROUP SETID to boolean, but the test suite expects the literal "OK" string. Remove these mappings (or map them to a passthrough formatter) so the raw "OK" is returned.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
… and AsyncCommands
…and AsyncCommands
…and AsyncCommands
todo:
fixes #65