diff --git a/stdlib/2/SocketServer.pyi b/stdlib/2/SocketServer.pyi index 41152a2e0..3f57efbe9 100644 --- a/stdlib/2/SocketServer.pyi +++ b/stdlib/2/SocketServer.pyi @@ -63,23 +63,24 @@ if sys.platform != 'win32': RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... -class ForkingMixIn: - timeout: Optional[float] # undocumented - active_children: Optional[List[int]] # undocumented - max_children: int # undocumented - if sys.version_info >= (3, 7): - block_on_close: bool - if sys.version_info >= (3, 6): - def collect_children(self, *, blocking: bool = ...) -> None: ... # undocumented - else: - def collect_children(self) -> None: ... # undocumented - def handle_timeout(self) -> None: ... # undocumented - if sys.version_info >= (3, 3): - def service_actions(self) -> None: ... # undocumented - def process_request(self, request: bytes, - client_address: Tuple[str, int]) -> None: ... - if sys.version_info >= (3, 6): - def server_close(self) -> None: ... +if sys.platform != "win32": + class ForkingMixIn: + timeout: Optional[float] # undocumented + active_children: Optional[List[int]] # undocumented + max_children: int # undocumented + if sys.version_info >= (3, 7): + block_on_close: bool + if sys.version_info >= (3, 6): + def collect_children(self, *, blocking: bool = ...) -> None: ... # undocumented + else: + def collect_children(self) -> None: ... # undocumented + def handle_timeout(self) -> None: ... # undocumented + if sys.version_info >= (3, 3): + def service_actions(self) -> None: ... # undocumented + def process_request(self, request: bytes, + client_address: Tuple[str, int]) -> None: ... + if sys.version_info >= (3, 6): + def server_close(self) -> None: ... class ThreadingMixIn: daemon_threads: bool @@ -92,8 +93,9 @@ class ThreadingMixIn: if sys.version_info >= (3, 6): def server_close(self) -> None: ... -class ForkingTCPServer(ForkingMixIn, TCPServer): ... -class ForkingUDPServer(ForkingMixIn, UDPServer): ... +if sys.platform != "win32": + class ForkingTCPServer(ForkingMixIn, TCPServer): ... + class ForkingUDPServer(ForkingMixIn, UDPServer): ... class ThreadingTCPServer(ThreadingMixIn, TCPServer): ... class ThreadingUDPServer(ThreadingMixIn, UDPServer): ... if sys.platform != 'win32': diff --git a/stdlib/3/socketserver.pyi b/stdlib/3/socketserver.pyi index 41152a2e0..3f57efbe9 100644 --- a/stdlib/3/socketserver.pyi +++ b/stdlib/3/socketserver.pyi @@ -63,23 +63,24 @@ if sys.platform != 'win32': RequestHandlerClass: Callable[..., BaseRequestHandler], bind_and_activate: bool = ...) -> None: ... -class ForkingMixIn: - timeout: Optional[float] # undocumented - active_children: Optional[List[int]] # undocumented - max_children: int # undocumented - if sys.version_info >= (3, 7): - block_on_close: bool - if sys.version_info >= (3, 6): - def collect_children(self, *, blocking: bool = ...) -> None: ... # undocumented - else: - def collect_children(self) -> None: ... # undocumented - def handle_timeout(self) -> None: ... # undocumented - if sys.version_info >= (3, 3): - def service_actions(self) -> None: ... # undocumented - def process_request(self, request: bytes, - client_address: Tuple[str, int]) -> None: ... - if sys.version_info >= (3, 6): - def server_close(self) -> None: ... +if sys.platform != "win32": + class ForkingMixIn: + timeout: Optional[float] # undocumented + active_children: Optional[List[int]] # undocumented + max_children: int # undocumented + if sys.version_info >= (3, 7): + block_on_close: bool + if sys.version_info >= (3, 6): + def collect_children(self, *, blocking: bool = ...) -> None: ... # undocumented + else: + def collect_children(self) -> None: ... # undocumented + def handle_timeout(self) -> None: ... # undocumented + if sys.version_info >= (3, 3): + def service_actions(self) -> None: ... # undocumented + def process_request(self, request: bytes, + client_address: Tuple[str, int]) -> None: ... + if sys.version_info >= (3, 6): + def server_close(self) -> None: ... class ThreadingMixIn: daemon_threads: bool @@ -92,8 +93,9 @@ class ThreadingMixIn: if sys.version_info >= (3, 6): def server_close(self) -> None: ... -class ForkingTCPServer(ForkingMixIn, TCPServer): ... -class ForkingUDPServer(ForkingMixIn, UDPServer): ... +if sys.platform != "win32": + class ForkingTCPServer(ForkingMixIn, TCPServer): ... + class ForkingUDPServer(ForkingMixIn, UDPServer): ... class ThreadingTCPServer(ThreadingMixIn, TCPServer): ... class ThreadingUDPServer(ThreadingMixIn, UDPServer): ... if sys.platform != 'win32': diff --git a/third_party/2and3/werkzeug/serving.pyi b/third_party/2and3/werkzeug/serving.pyi index 54bce9784..5b5305014 100644 --- a/third_party/2and3/werkzeug/serving.pyi +++ b/third_party/2and3/werkzeug/serving.pyi @@ -2,12 +2,20 @@ import sys from typing import Any, Optional if sys.version_info < (3,): - from SocketServer import ThreadingMixIn, ForkingMixIn + from SocketServer import ThreadingMixIn from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler else: - from socketserver import ThreadingMixIn, ForkingMixIn + from socketserver import ThreadingMixIn from http.server import HTTPServer, BaseHTTPRequestHandler +if sys.platform == "win32": + class ForkingMixIn(object): ... +else: + if sys.version_info < (3,): + from SocketServer import ForkingMixIn as ForkingMixIn + else: + from socketserver import ForkingMixIn as ForkingMixIn + class _SslDummy: def __getattr__(self, name): ...