DX-2186: Add Redis stream commands#66
Merged
Merged
Conversation
todo: fix skipped tests, improve response formating
Contributor
There was a problem hiding this comment.
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.
| "XGROUP DESTROY": to_bool, | ||
| "XGROUP CREATECONSUMER": to_bool, | ||
| "XGROUP DELCONSUMER": to_bool, | ||
| "XGROUP SETID": ok_to_bool, |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… and AsyncCommands
…and AsyncCommands
…and AsyncCommands
alitariksahin
approved these changes
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
todo:
fixes #65