Skip to content

Commit 98640df

Browse files
committed
Add arguments to asyncio.Redis.from_url() which are not passed to ConnectionPool
Documentation specifies that the `kwargs` are pssed to `ConnectionPool` but some arguments are not meant for it.
1 parent 2d8a128 commit 98640df

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* Fix #2831, closing connections and sockets when garbage collected.
1+
* Fix #2831, add auto_close_connection_pool=True arg to asyncio.Redis.from_url()
22
* Fix incorrect redis.asyncio.Cluster type hint for `retry_on_error`
33
* Fix dead weakref in sentinel connection causing ReferenceError (#2767)
44
* Fix #2768, Fix KeyError: 'first-entry' in parse_xinfo_stream.

redis/asyncio/client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ class Redis(
104104
response_callbacks: MutableMapping[Union[str, bytes], ResponseCallbackT]
105105

106106
@classmethod
107-
def from_url(cls, url: str, **kwargs):
107+
def from_url(
108+
cls,
109+
url: str,
110+
single_connection_client: bool = False,
111+
auto_close_connection_pool: bool = True,
112+
**kwargs,
113+
):
108114
"""
109115
Return a Redis client object configured from the given URL
110116

0 commit comments

Comments
 (0)