diff --git a/redis/asyncio/connection.py b/redis/asyncio/connection.py index f430d0a1c6..462673f2ed 100644 --- a/redis/asyncio/connection.py +++ b/redis/asyncio/connection.py @@ -831,8 +831,8 @@ async def can_read_destructive(self): async def read_response( self, disable_decoding: bool = False, - *, timeout: Optional[float] = None, + *, disconnect_on_error: bool = True, ): """Read the response from a previously sent command""" diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py index a7df03ad91..ac3537db52 100644 --- a/tests/test_asyncio/test_commands.py +++ b/tests/test_asyncio/test_commands.py @@ -20,7 +20,7 @@ skip_unless_arch_bits, ) -if sys.version_info.major >= 3 and sys.version_info.minor >= 11: +if sys.version_info >= (3, 11, 3): from asyncio import timeout as async_timeout else: from async_timeout import timeout as async_timeout @@ -3032,7 +3032,7 @@ async def helper(): # If the following is not done, further Timout operations will fail, # because the timeout won't catch its Cancelled Error if the task # has a pending cancel. Python documentation probably should reflect this. - if sys.version_info.major >= 3 and sys.version_info.minor >= 11: + if sys.version_info >= (3, 11): asyncio.current_task().uncancel() # if all is well, we can continue. The following should not hang. await r.set("status", "down")