diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ac3ee206..77d1428bcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,7 +53,8 @@ #### Fixes * Java: Add overloads for XADD to allow duplicate entry keys ([#1970](https://github.com/valkey-io/valkey-glide/pull/1970)) * Node: Fix ZADD bug where command could not be called with only the `changed` optional parameter ([#1995](https://github.com/valkey-io/valkey-glide/pull/1995)) -* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920)) +* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920)) +* Python: Fix `XClaim` return type to `List[bytes]` instead of `List[TEncodable]` ([#2075](https://github.com/valkey-io/valkey-glide/pull/2075)) ## 1.0.0 (2024-07-09) diff --git a/python/python/glide/async_commands/core.py b/python/python/glide/async_commands/core.py index a8c0d63062..c61f069a5f 100644 --- a/python/python/glide/async_commands/core.py +++ b/python/python/glide/async_commands/core.py @@ -3234,7 +3234,7 @@ async def xclaim( options (Optional[StreamClaimOptions]): Stream claim options. Returns: - A Mapping of message entries with the format + Mapping[bytes, List[List[bytes]]]: A Mapping of message entries with the format {"entryId": [["entry", "data"], ...], ...} that are claimed by the consumer. Examples: @@ -3268,7 +3268,7 @@ async def xclaim_just_id( min_idle_time_ms: int, ids: List[TEncodable], options: Optional[StreamClaimOptions] = None, - ) -> List[TEncodable]: + ) -> List[bytes]: """ Changes the ownership of a pending message. This function returns a List with only the message/entry IDs, and is equivalent to using JUSTID in the Valkey API. @@ -3284,7 +3284,7 @@ async def xclaim_just_id( options (Optional[StreamClaimOptions]): Stream claim options. Returns: - A List of message ids claimed by the consumer. + List[bytes]: A List of message ids claimed by the consumer. Examples: # read messages from streamId for consumer1 @@ -3296,7 +3296,7 @@ async def xclaim_just_id( } # "1-0" is now read, and we can assign the pending messages to consumer2 >>> await client.xclaim_just_id("mystream", "mygroup", "consumer2", 0, ["1-0"]) - ["1-0"] + [b"1-0"] """ args = [ @@ -3312,7 +3312,7 @@ async def xclaim_just_id( args.extend(options.to_args()) return cast( - List[TEncodable], + List[bytes], await self._execute_command(RequestType.XClaim, args), )