@@ -31,10 +31,6 @@ SOCK_RAW: SocketKind
3131SOCK_RDM : SocketKind
3232SOCK_SEQPACKET : SocketKind
3333
34- if sys .platform == "linux" and sys .version_info >= (3 ,):
35- SOCK_CLOEXEC : SocketKind
36- SOCK_NONBLOCK : SocketKind
37-
3834# Address families not mentioned in the docs
3935AF_AAL5 : AddressFamily
4036AF_APPLETALK : AddressFamily
@@ -261,88 +257,6 @@ TCP_SYNCNT: int
261257TCP_WINDOW_CLAMP : int
262258# Specifically-documented constants
263259
264- if sys .platform == "linux" and sys .version_info >= (3 ,):
265- AF_CAN : AddressFamily
266- PF_CAN : int
267- SOL_CAN_BASE : int
268- SOL_CAN_RAW : int
269- CAN_EFF_FLAG : int
270- CAN_EFF_MASK : int
271- CAN_ERR_FLAG : int
272- CAN_ERR_MASK : int
273- CAN_RAW : int
274- CAN_RAW_ERR_FILTER : int
275- CAN_RAW_FILTER : int
276- CAN_RAW_LOOPBACK : int
277- CAN_RAW_RECV_OWN_MSGS : int
278- CAN_RTR_FLAG : int
279- CAN_SFF_MASK : int
280-
281- CAN_BCM : int
282- CAN_BCM_TX_SETUP : int
283- CAN_BCM_TX_DELETE : int
284- CAN_BCM_TX_READ : int
285- CAN_BCM_TX_SEND : int
286- CAN_BCM_RX_SETUP : int
287- CAN_BCM_RX_DELETE : int
288- CAN_BCM_RX_READ : int
289- CAN_BCM_TX_STATUS : int
290- CAN_BCM_TX_EXPIRED : int
291- CAN_BCM_RX_STATUS : int
292- CAN_BCM_RX_TIMEOUT : int
293- CAN_BCM_RX_CHANGED : int
294-
295- CAN_RAW_FD_FRAMES : int
296-
297- if sys .platform == "linux" and sys .version_info >= (3 , 8 ):
298- CAN_BCM_SETTIMER : int
299- CAN_BCM_STARTTIMER : int
300- CAN_BCM_TX_COUNTEVT : int
301- CAN_BCM_TX_ANNOUNCE : int
302- CAN_BCM_TX_CP_CAN_ID : int
303- CAN_BCM_RX_FILTER_ID : int
304- CAN_BCM_RX_CHECK_DLC : int
305- CAN_BCM_RX_NO_AUTOTIMER : int
306- CAN_BCM_RX_ANNOUNCE_RESUME : int
307- CAN_BCM_TX_RESET_MULTI_IDX : int
308- CAN_BCM_RX_RTR_FRAME : int
309- CAN_BCM_CAN_FD_FRAME : int
310-
311- if sys .platform == "linux" and sys .version_info >= (3 , 7 ):
312- CAN_ISOTP : int
313-
314- if sys .platform == "linux" and sys .version_info >= (3 , 9 ):
315- CAN_J1939 : int
316-
317- J1939_MAX_UNICAST_ADDR : int
318- J1939_IDLE_ADDR : int
319- J1939_NO_ADDR : int
320- J1939_NO_NAME : int
321- J1939_PGN_REQUEST : int
322- J1939_PGN_ADDRESS_CLAIMED : int
323- J1939_PGN_ADDRESS_COMMANDED : int
324- J1939_PGN_PDU1_MAX : int
325- J1939_PGN_MAX : int
326- J1939_NO_PGN : int
327-
328- SO_J1939_FILTER : int
329- SO_J1939_PROMISC : int
330- SO_J1939_SEND_PRIO : int
331- SO_J1939_ERRQUEUE : int
332-
333- SCM_J1939_DEST_ADDR : int
334- SCM_J1939_DEST_NAME : int
335- SCM_J1939_PRIO : int
336- SCM_J1939_ERRQUEUE : int
337-
338- J1939_NLA_PAD : int
339- J1939_NLA_BYTES_ACKED : int
340-
341- J1939_EE_INFO_NONE : int
342- J1939_EE_INFO_TX_ABORT : int
343-
344- J1939_FILTER_MAX : int
345-
346260if sys .platform == "linux" :
347261 AF_PACKET : AddressFamily
348262 PF_PACKET : int
@@ -354,29 +268,6 @@ if sys.platform == "linux":
354268 PACKET_OTHERHOST : int
355269 PACKET_OUTGOING : int
356270
357- if sys .platform == "linux" and sys .version_info >= (3 ,):
358- AF_RDS : AddressFamily
359- PF_RDS : int
360- SOL_RDS : int
361- RDS_CANCEL_SENT_TO : int
362- RDS_CMSG_RDMA_ARGS : int
363- RDS_CMSG_RDMA_DEST : int
364- RDS_CMSG_RDMA_MAP : int
365- RDS_CMSG_RDMA_STATUS : int
366- RDS_CMSG_RDMA_UPDATE : int
367- RDS_CONG_MONITOR : int
368- RDS_FREE_MR : int
369- RDS_GET_MR : int
370- RDS_GET_MR_FOR_DEST : int
371- RDS_RDMA_DONTWAIT : int
372- RDS_RDMA_FENCE : int
373- RDS_RDMA_INVALIDATE : int
374- RDS_RDMA_NOTIFY_ME : int
375- RDS_RDMA_READWRITE : int
376- RDS_RDMA_SILENT : int
377- RDS_RDMA_USE_ONCE : int
378- RDS_RECVERR : int
379-
380271if sys .platform == "win32" :
381272 SIO_RCVALL : int
382273 SIO_KEEPALIVE_VALS : int
@@ -413,38 +304,8 @@ if sys.platform == "linux":
413304 TIPC_WITHDRAWN : int
414305 TIPC_ZONE_SCOPE : int
415306
416- if sys .platform == "linux" and sys .version_info >= (3 , 6 ):
417- AF_ALG : AddressFamily
418- SOL_ALG : int
419- ALG_OP_DECRYPT : int
420- ALG_OP_ENCRYPT : int
421- ALG_OP_SIGN : int
422- ALG_OP_VERIFY : int
423- ALG_SET_AEAD_ASSOCLEN : int
424- ALG_SET_AEAD_AUTHSIZE : int
425- ALG_SET_IV : int
426- ALG_SET_KEY : int
427- ALG_SET_OP : int
428- ALG_SET_PUBKEY : int
429-
430- if sys .platform == "linux" and sys .version_info >= (3 , 7 ):
431- AF_VSOCK : AddressFamily
432- IOCTL_VM_SOCKETS_GET_LOCAL_CID : int
433- VMADDR_CID_ANY : int
434- VMADDR_CID_HOST : int
435- VMADDR_PORT_ANY : int
436- SO_VM_SOCKETS_BUFFER_MAX_SIZE : int
437- SO_VM_SOCKETS_BUFFER_SIZE : int
438- SO_VM_SOCKETS_BUFFER_MIN_SIZE : int
439- VM_SOCKETS_INVALID_VERSION : int
440-
441307AF_LINK : AddressFamily # Availability: BSD, macOS
442308
443- # BDADDR_* and HCI_* listed with other bluetooth constants below
444-
445- if sys .platform == "linux" and sys .version_info >= (3 , 8 ):
446- AF_QIPCRTR : AddressFamily
447-
448309# Semi-documented constants
449310# (Listed under "Socket families" in the docs, but not "Constants")
450311
@@ -542,9 +403,7 @@ class socket:
542403 @overload
543404 def getsockopt (self , level : int , optname : int , buflen : int ) -> bytes : ...
544405 def gettimeout (self ) -> Optional [float ]: ...
545- if sys .platform == "win32" and sys .version_info >= (3 , 6 ):
546- def ioctl (self , control : int , option : Union [int , Tuple [int , int , int ], bool ]) -> None : ...
547- elif sys .platform == "win32" :
406+ if sys .platform == "win32" :
548407 def ioctl (self , control : int , option : Union [int , Tuple [int , int , int ]]) -> None : ...
549408 def listen (self , __backlog : int ) -> None : ...
550409 # Note that the makefile's documented windows-specific behavior is not represented
@@ -559,10 +418,6 @@ class socket:
559418 def sendto (self , data : bytes , address : _Address ) -> int : ...
560419 @overload
561420 def sendto (self , data : bytes , flags : int , address : _Address ) -> int : ...
562- if sys .platform == "linux" and sys .version_info >= (3 , 6 ):
563- def sendmsg_afalg (
564- self , msg : Iterable [bytes ] = ..., * , op : int , iv : Any = ..., assoclen : int = ..., flags : int = ...
565- ) -> int : ...
566421 def setblocking (self , flag : bool ) -> None : ...
567422 def settimeout (self , value : Optional [float ]) -> None : ...
568423 def setsockopt (self , level : int , optname : int , value : Union [int , bytes ]) -> None : ...
@@ -579,9 +434,6 @@ def create_connection(
579434) -> socket : ...
580435def fromfd (fd : int , family : int , type : int , proto : int = ...) -> socket : ...
581436
582- if sys .platform == "win32" and sys .version_info >= (3 , 3 ):
583- def fromshare (info : bytes ) -> socket : ...
584-
585437# the 5th tuple item is an address
586438def getaddrinfo (
587439 host : Optional [Union [bytearray , bytes , Text ]],
0 commit comments