Skip to content

Dx 2353 - Update Redis API compat page for v1.15#68

Merged
CahidArda merged 14 commits intomainfrom
DX-2353
Feb 2, 2026
Merged

Dx 2353 - Update Redis API compat page for v1.15#68
CahidArda merged 14 commits intomainfrom
DX-2353

Conversation

@alitariksahin
Copy link
Copy Markdown
Contributor

Hash Commands
HGETDEL - Get and delete hash fields atomically
HGETEX - Get hash fields with expiration support
HSETEX - Set hash fields with expiration support

Stream Commands
XDELEX - Extended delete for streams
XACKDEL - Acknowledge and delete stream entries

Connection Commands
CLIENT SETINFO - Set client library name and version information

BITOP
Four new operations added:
BITOP DIFF - A bit is set only if it's set in all source bitmaps
BITOP DIFF1 - A bit is set if it's set in the first key but not in any of the other keys
BITOP ANDOR - A bit is set if it's set in X and also in one or more of Y1, Y2, ...
BITOP ONE - A bit is set if it's set in exactly one source key

XADD
Now supports auto sequence numbers via -* syntax

@alitariksahin alitariksahin self-assigned this Jan 25, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Jan 25, 2026

@alitariksahin alitariksahin changed the title Dx 2353 Dx 2353 - Update Redis API compat page for v1.15 Jan 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 pull request adds support for new Redis v1.15 commands to the Upstash Redis Python package. The changes implement new hash field operations with expiration support, stream command extensions, connection library metadata setting, and expanded BITOP operations with XADD auto-sequence support for Redis 8+.

Changes:

  • Added three new hash commands (HGETDEL, HGETEX, HSETEX) for atomic get-and-delete and field-level expiration
  • Added two new stream commands (XACKDEL, XDELEX) for enhanced stream entry management
  • Added CLIENT SETINFO command for setting client library metadata
  • Extended BITOP command with four new operations (DIFF, DIFF1, ANDOR, ONE) for advanced bitmap operations
  • Enhanced XADD documentation to describe auto-sequence number support (<ms>-* format)

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
upstash_redis/commands.pyi Added type hints for new commands in Commands, AsyncCommands, and PipelineCommands classes
upstash_redis/commands.py Implemented new command methods with validation, documentation, and Redis protocol construction
tests/commands/bitmap/test_bitop.py New comprehensive tests for extended BITOP operations
tests/commands/connection/test_client_setinfo.py Tests for CLIENT SETINFO command with various attribute formats
tests/commands/hash/test_hgetdel.py Tests for HGETDEL command including edge cases
tests/commands/hash/test_hgetex.py Tests for HGETEX command with various expiration options
tests/commands/hash/test_hsetex.py Tests for HSETEX command with expiration and conditional flags
tests/commands/stream/test_xackdel.py Comprehensive tests for XACKDEL command with options
tests/commands/stream/test_xdelex.py Tests for XDELEX command with various deletion behaviors
tests/commands/stream/test_xadd.py New tests for XADD auto-sequence number functionality
tests/commands/asyncio/bitmap/test_bitop_async.py Replaced old async bitmap tests with extended operation coverage
tests/commands/asyncio/bitmap/test_bitop.py Removed old async test file
tests/commands/asyncio/connection/test_client_setinfo_async.py Async tests for CLIENT SETINFO
tests/commands/asyncio/hash/test_hgetdel_async.py Async tests for HGETDEL
tests/commands/asyncio/hash/test_hgetex_async.py Async tests for HGETEX
tests/commands/asyncio/hash/test_hsetex_async.py Async tests for HSETEX
tests/commands/asyncio/stream/test_xackdel_async.py Async tests for XACKDEL
tests/commands/asyncio/stream/test_xdelex_async.py Async tests for XDELEX
tests/commands/asyncio/stream/test_xadd.py Updated with async auto-sequence tests
Comments suppressed due to low confidence (1)

upstash_redis/commands.py:137

  • The bitop implementation should convert the operation parameter to uppercase before validating and sending to Redis. Currently it passes the operation as-is, but the validation check on line 130 is case-sensitive ("NOT" vs "not"). This creates inconsistency since the tests expect case-insensitive operations to work. Add operation.upper() conversion before the validation checks and when building the command.
        if len(keys) == 0:
            raise Exception("At least one source key must be specified.")

        if operation == "NOT" and len(keys) > 1:
            raise Exception(
                'The "NOT" operation takes only one source key as argument.'
            )

        command: List = ["BITOP", operation, destkey, *keys]

        return self.execute(command)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread upstash_redis/commands.py Outdated
Comment thread upstash_redis/commands.py Outdated
Comment thread tests/commands/asyncio/bitmap/test_bitop_async.py
Comment thread tests/commands/hash/test_hgetdel.py
Comment thread upstash_redis/commands.py
Comment thread upstash_redis/commands.py Outdated
@CahidArda CahidArda merged commit 1033c50 into main Feb 2, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants