mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Update socket stubs for Python3.12 (#10247)
Docs: https://github.com/python/cpython/blob/3.12/Doc/library/socket.rst Source: https://github.com/python/cpython/blob/3.12/Modules/socketmodule.c#L8441
This commit is contained in:
@@ -692,3 +692,28 @@ if sys.platform != "win32" or sys.version_info >= (3, 8):
|
||||
def if_nameindex() -> list[tuple[int, str]]: ...
|
||||
def if_nametoindex(__name: str) -> int: ...
|
||||
def if_indextoname(__index: int) -> str: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
IP_PKTINFO: int
|
||||
IP_UNBLOCK_SOURCE: int
|
||||
IP_BLOCK_SOURCE: int
|
||||
IP_ADD_SOURCE_MEMBERSHIP: int
|
||||
IP_DROP_SOURCE_MEMBERSHIP: int
|
||||
if sys.platform == "win32":
|
||||
AF_HYPERV: int
|
||||
HV_PROTOCOL_RAW: int
|
||||
HVSOCKET_CONNECT_TIMEOUT: int
|
||||
HVSOCKET_CONNECT_TIMEOUT_MAX: int
|
||||
HVSOCKET_CONNECTED_SUSPEND: int
|
||||
HVSOCKET_ADDRESS_FLAG_PASSTHRU: int
|
||||
HV_GUID_ZERO: str
|
||||
HV_GUID_WILDCARD: str
|
||||
HV_GUID_BROADCAST: str
|
||||
HV_GUID_CHILDREN: str
|
||||
HV_GUID_LOOPBACK: str
|
||||
HV_GUID_PARENT: str
|
||||
else:
|
||||
ETHERTYPE_ARP: int
|
||||
ETHERTYPE_IP: int
|
||||
ETHERTYPE_IPV6: int
|
||||
ETHERTYPE_VLAN: int
|
||||
|
||||
Reference in New Issue
Block a user