Skip to content

Commit

Permalink
Improve return type for socket.getaddrinfo for missing ipv6 support (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MaicoTimmerman authored Jan 6, 2025
1 parent 9f28171 commit 3de624f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]]]: ...

0 comments on commit 3de624f

Please sign in to comment.