Skip to content

Commit 4295fc1

Browse files
committed
Clarify comment, since there is no __del__ on asyncio.connection.ConnectionPool
1 parent 8e8694c commit 4295fc1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

redis/asyncio/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def __init__(
227227
lib_version: Optional[str] = get_lib_version(),
228228
username: Optional[str] = None,
229229
retry: Optional[Retry] = None,
230-
# deprecated. create a pool and use connection_pool instead
231230
auto_close_connection_pool: Optional[bool] = None,
232231
redis_connect_func=None,
233232
credential_provider: Optional[CredentialProvider] = None,
@@ -241,7 +240,9 @@ def __init__(
241240
To retry on TimeoutError, `retry_on_timeout` can also be set to `True`.
242241
"""
243242
kwargs: Dict[str, Any]
244-
243+
# auto_close_connection_pool only has an effect if connection_pool is
244+
# None. It is assumed that if connection_pool is not None, the user
245+
# wants to manage the connection pool themselves.
245246
if auto_close_connection_pool is not None:
246247
warnings.warn(
247248
DeprecationWarning(

0 commit comments

Comments
 (0)