mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
socket: constructor accepts bytes on Windows (#9095)
d04899abb0/Modules/socketmodule.c (L5318)
This is used in `socket.fromshare`. It must be bytes, not some other buffer.
This commit is contained in:
@@ -583,7 +583,11 @@ class socket:
|
||||
def proto(self) -> int: ...
|
||||
@property
|
||||
def timeout(self) -> float | None: ...
|
||||
def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: _FD | None = ...) -> None: ...
|
||||
if sys.platform == "win32":
|
||||
def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: _FD | bytes | None = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: _FD | None = ...) -> None: ...
|
||||
|
||||
def bind(self, __address: _Address) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def connect(self, __address: _Address) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user