stdlib: socket.CMSG_LEN & socket.CMSG_SPACE are only available on Unix (#7384)

This commit is contained in:
Martin Fischer
2022-02-25 21:28:44 +01:00
committed by Jelle Zijlstra
parent af269057be
commit 8138981492

View File

@@ -12,8 +12,6 @@ from typing_extensions import Literal
import _socket
from _socket import (
_FD,
CMSG_LEN as CMSG_LEN,
CMSG_SPACE as CMSG_SPACE,
EAI_ADDRFAMILY as EAI_ADDRFAMILY,
EAI_AGAIN as EAI_AGAIN,
EAI_BADFLAGS as EAI_BADFLAGS,
@@ -213,7 +211,7 @@ from _socket import (
if sys.version_info >= (3, 7):
from _socket import close as close
if sys.platform != "win32":
from _socket import sethostname as sethostname
from _socket import CMSG_LEN as CMSG_LEN, CMSG_SPACE as CMSG_SPACE, sethostname as sethostname
if sys.platform != "win32" or sys.version_info >= (3, 8):
from _socket import if_indextoname as if_indextoname, if_nameindex as if_nameindex, if_nametoindex as if_nametoindex
if sys.platform == "linux":