diff --git a/stdlib/_socket.pyi b/stdlib/_socket.pyi index df6b45a2d394..f7b0e6901bf4 100644 --- a/stdlib/_socket.pyi +++ b/stdlib/_socket.pyi @@ -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: ...