Improve return type for socket.getaddrinfo for missing ipv6 support (#13372)

This commit is contained in:
Maico Timmerman
2025-01-06 14:40:07 +01:00
committed by GitHub
parent 9f28171658
commit 3de624f980

View File

@@ -1399,7 +1399,7 @@ def create_server(
address: _Address, *, family: int = ..., backlog: int | None = None, reuse_port: bool = False, dualstack_ipv6: bool = False
) -> socket: ...
# the 5th tuple item is an address
# The 5th tuple item is the socket address, for IP4, IP6, or IP6 if Python is compiled with --disable-ipv6, respectively.
def getaddrinfo(
host: bytes | str | None, port: bytes | str | int | None, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0
) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int]]]: ...
) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes]]]: ...