Skip to content

Commit 3de624f

Browse files
Improve return type for socket.getaddrinfo for missing ipv6 support (#13372)
1 parent 9f28171 commit 3de624f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/socket.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ def create_server(
13991399
address: _Address, *, family: int = ..., backlog: int | None = None, reuse_port: bool = False, dualstack_ipv6: bool = False
14001400
) -> socket: ...
14011401

1402-
# the 5th tuple item is an address
1402+
# The 5th tuple item is the socket address, for IP4, IP6, or IP6 if Python is compiled with --disable-ipv6, respectively.
14031403
def getaddrinfo(
14041404
host: bytes | str | None, port: bytes | str | int | None, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0
1405-
) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int]]]: ...
1405+
) -> list[tuple[AddressFamily, SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes]]]: ...

0 commit comments

Comments
 (0)