Skip to content

Commit 0a6645f

Browse files
committed
Redis: Add missing exported names
- redis.asyncio.RedisCluster / redis.asyncio.CommandsParser, added in 4.3.0 - redis.default_backoff / redis.asyncio.default_backoff, added in 4.4.0
1 parent 853d01d commit 0a6645f

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

stubs/redis/redis/__init__.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from . import client, connection, credentials, exceptions, sentinel, utils
1+
from . import backoff, client, connection, credentials, exceptions, sentinel, utils
22
from .cluster import RedisCluster as RedisCluster
33

44
__all__ = [
@@ -13,6 +13,7 @@ __all__ = [
1313
"CredentialProvider",
1414
"DataError",
1515
"from_url",
16+
"default_backoff",
1617
"InvalidResponse",
1718
"PubSubError",
1819
"ReadOnlyError",
@@ -32,6 +33,8 @@ __all__ = [
3233
"WatchError",
3334
]
3435

36+
default_backoff = backoff.default_backoff
37+
3538
Redis = client.Redis
3639

3740
BlockingConnectionPool = connection.BlockingConnectionPool

stubs/redis/redis/asyncio/__init__.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
from redis.asyncio.client import Redis as Redis, StrictRedis as StrictRedis
2+
from redis.asyncio.cluster import RedisCluster as RedisCluster
23
from redis.asyncio.connection import (
34
BlockingConnectionPool as BlockingConnectionPool,
45
Connection as Connection,
56
ConnectionPool as ConnectionPool,
67
SSLConnection as SSLConnection,
78
UnixDomainSocketConnection as UnixDomainSocketConnection,
89
)
10+
from redis.asyncio.parser import CommandsParser as CommandsParser
911
from redis.asyncio.sentinel import (
1012
Sentinel as Sentinel,
1113
SentinelConnectionPool as SentinelConnectionPool,
1214
SentinelManagedConnection as SentinelManagedConnection,
1315
SentinelManagedSSLConnection as SentinelManagedSSLConnection,
1416
)
1517
from redis.asyncio.utils import from_url as from_url
18+
from redis.backoff import default_backoff as default_backoff
1619
from redis.exceptions import (
1720
AuthenticationError as AuthenticationError,
1821
AuthenticationWrongNumberOfArgsError as AuthenticationWrongNumberOfArgsError,
@@ -35,15 +38,18 @@ __all__ = [
3538
"BlockingConnectionPool",
3639
"BusyLoadingError",
3740
"ChildDeadlockedError",
41+
"CommandsParser",
3842
"Connection",
3943
"ConnectionError",
4044
"ConnectionPool",
4145
"DataError",
4246
"from_url",
47+
"default_backoff",
4348
"InvalidResponse",
4449
"PubSubError",
4550
"ReadOnlyError",
4651
"Redis",
52+
"RedisCluster",
4753
"RedisError",
4854
"ResponseError",
4955
"Sentinel",

stubs/redis/redis/backoff.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ class EqualJitterBackoff(AbstractBackoff):
2727
class DecorrelatedJitterBackoff(AbstractBackoff):
2828
def __init__(self, cap: float = 0.512, base: float = 0.008) -> None: ...
2929
def compute(self, failures: int) -> float: ...
30+
31+
def default_backoff() -> EqualJitterBackoff: ...

0 commit comments

Comments
 (0)