Update _socket and socket for 3.14 (#14055)

This commit is contained in:
sobolevn
2025-05-14 13:23:38 +03:00
committed by GitHub
parent fc1ee8fed9
commit 58a4def3c1
5 changed files with 61 additions and 38 deletions
+33
View File
@@ -1023,6 +1023,39 @@ if sys.platform != "linux":
__all__ += ["IPPROTO_GGP", "IPPROTO_IPV4", "IPPROTO_MAX", "IPPROTO_ND", "IP_RECVDSTADDR", "SO_USELOOPBACK"]
if sys.version_info >= (3, 14):
from _socket import IP_RECVTTL as IP_RECVTTL
__all__ += ["IP_RECVTTL"]
if sys.platform == "win32" or sys.platform == "linux":
from _socket import IP_RECVERR as IP_RECVERR, IPV6_RECVERR as IPV6_RECVERR, SO_ORIGINAL_DST as SO_ORIGINAL_DST
__all__ += ["IP_RECVERR", "IPV6_RECVERR", "SO_ORIGINAL_DST"]
if sys.platform == "win32":
from _socket import (
SO_BTH_ENCRYPT as SO_BTH_ENCRYPT,
SO_BTH_MTU as SO_BTH_MTU,
SO_BTH_MTU_MAX as SO_BTH_MTU_MAX,
SO_BTH_MTU_MIN as SO_BTH_MTU_MIN,
SOL_RFCOMM as SOL_RFCOMM,
TCP_QUICKACK as TCP_QUICKACK,
)
__all__ += ["SOL_RFCOMM", "SO_BTH_ENCRYPT", "SO_BTH_MTU", "SO_BTH_MTU_MAX", "SO_BTH_MTU_MIN", "TCP_QUICKACK"]
if sys.platform == "linux":
from _socket import (
CAN_RAW_ERR_FILTER as CAN_RAW_ERR_FILTER,
IP_FREEBIND as IP_FREEBIND,
IP_RECVORIGDSTADDR as IP_RECVORIGDSTADDR,
SO_ORIGINAL_DST as SO_ORIGINAL_DST,
VMADDR_CID_LOCAL as VMADDR_CID_LOCAL,
)
__all__ += ["CAN_RAW_ERR_FILTER", "IP_FREEBIND", "IP_RECVORIGDSTADDR", "VMADDR_CID_LOCAL"]
# Re-exported from errno
EBADF: int
EAGAIN: int