Skip to content

Commit

Permalink
Add arguments to asyncio.Redis.from_url() which are not passed to `…
Browse files Browse the repository at this point in the history
…ConnectionPool`

Documentation specifies that the `kwargs` are pssed to `ConnectionPool` but some
arguments are not meant for it.
  • Loading branch information
kristjanvalur committed Jul 28, 2023
1 parent 2d8a128 commit 98640df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Fix #2831, closing connections and sockets when garbage collected.
* Fix #2831, add auto_close_connection_pool=True arg to asyncio.Redis.from_url()
* Fix incorrect redis.asyncio.Cluster type hint for `retry_on_error`
* Fix dead weakref in sentinel connection causing ReferenceError (#2767)
* Fix #2768, Fix KeyError: 'first-entry' in parse_xinfo_stream.
Expand Down
8 changes: 7 additions & 1 deletion redis/asyncio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ class Redis(
response_callbacks: MutableMapping[Union[str, bytes], ResponseCallbackT]

@classmethod
def from_url(cls, url: str, **kwargs):
def from_url(
cls,
url: str,
single_connection_client: bool = False,
auto_close_connection_pool: bool = True,
**kwargs,
):
"""
Return a Redis client object configured from the given URL
Expand Down

0 comments on commit 98640df

Please sign in to comment.