Skip to content

[redis] Update to 4.5.1#9697

Merged
AlexWaygood merged 4 commits intopython:mainfrom
srittau:redis-4.5.1
Feb 10, 2023
Merged

[redis] Update to 4.5.1#9697
AlexWaygood merged 4 commits intopython:mainfrom
srittau:redis-4.5.1

Conversation

@srittau
Copy link
Copy Markdown
Collaborator

@srittau srittau commented Feb 9, 2023

Also add a few argument defaults

Closes: #9479

@github-actions

This comment has been minimized.

async def send_packed_command(self, command: bytes | str | Iterable[bytes], check_health: bool = ...): ...
async def send_command(self, *args, **kwargs) -> None: ...
async def read_response(self, disable_decoding: bool = ..., timeout: float | None = ...): ...
async def read_response(self, disable_decoding: bool = False, timeout: float | None = None) -> Incomplete | None: ...
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will only return None if timeout is not None (and an asyncio.TimeoutError is raised), so you could possibly overload this:

Suggested change
async def read_response(self, disable_decoding: bool = False, timeout: float | None = None) -> Incomplete | None: ...
@overload
async def read_response(self, disable_decoding: bool = False, timeout: float) -> Incomplete | None: ...
@overload
async def read_response(self, disable_decoding: bool = False, timeout: None = None) -> Incomplete: ...

async def connect_to(self, address) -> None: ...
async def connect(self): ...
async def read_response(self, disable_decoding: bool = ...): ... # type: ignore[override]
async def read_response(self, disable_decoding: bool = False, timeout: float | None = None) -> Incomplete | None: ...
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as with the method in redis.asyncio.client

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood merged commit 39487a8 into python:main Feb 10, 2023
@srittau srittau deleted the redis-4.5.1 branch February 10, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants