From 2c2efbd404af129f4850e667c82946977b692497 Mon Sep 17 00:00:00 2001 From: Kevin James Date: Thu, 15 Jun 2023 18:23:01 +0100 Subject: [PATCH 1/2] fix(asyncio.cluster): fixup retry_on_error type hint This parameter accepts a list of _classes of Exceptions_, not a list of instantiated Exceptions. Fixup the type hint accordingly. --- redis/asyncio/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/asyncio/cluster.py b/redis/asyncio/cluster.py index 929d3e47c7..989c6ccda8 100644 --- a/redis/asyncio/cluster.py +++ b/redis/asyncio/cluster.py @@ -249,7 +249,7 @@ def __init__( socket_keepalive_options: Optional[Mapping[int, Union[int, bytes]]] = None, socket_timeout: Optional[float] = None, retry: Optional["Retry"] = None, - retry_on_error: Optional[List[Exception]] = None, + retry_on_error: Optional[List[Type[Exception]]] = None, # SSL related kwargs ssl: bool = False, ssl_ca_certs: Optional[str] = None, From e940db266bad0be34134d090122ad75cf60e9660 Mon Sep 17 00:00:00 2001 From: Kevin James Date: Thu, 15 Jun 2023 18:26:02 +0100 Subject: [PATCH 2/2] chore: update changelog --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index 7fd510bd12..66ded02208 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4 @@ + * Fix incorrect redis.asyncio.Cluster type hint for `retry_on_error` * Fix #2749, remove unnecessary __del__ logic to close connections. * Fix #2754, adding a missing argument to SentinelManagedConnection * Fix `xadd` command to accept non-negative `maxlen` including 0