Skip to content

socket: add all_errors param to create_connection #7691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions stdlib/socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -605,11 +605,22 @@ class SocketIO(RawIOBase):
def mode(self) -> Literal["rb", "wb", "rwb"]: ...

def getfqdn(name: str = ...) -> str: ...
def create_connection(
address: tuple[str | None, int],
timeout: float | None = ..., # noqa: F811
source_address: tuple[bytearray | bytes | str, int] | None = ...,
) -> socket: ...

if sys.version_info >= (3, 11):
def create_connection(
address: tuple[str | None, int],
timeout: float | None = ..., # noqa: F811
source_address: tuple[bytearray | bytes | str, int] | None = ...,
*,
all_errors: bool = ...,
) -> socket: ...

else:
def create_connection(
address: tuple[str | None, int],
timeout: float | None = ..., # noqa: F811
source_address: tuple[bytearray | bytes | str, int] | None = ...,
) -> socket: ...

if sys.version_info >= (3, 8):
def has_dualstack_ipv6() -> bool: ...
Expand Down