massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / SocketServer.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2/SocketServer.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2/SocketServer.pyi
new file mode 100644 (file)
index 0000000..4ed73aa
--- /dev/null
@@ -0,0 +1,99 @@
+# NB: SocketServer.pyi and socketserver.pyi must remain consistent!\r
+# Stubs for socketserver\r
+\r
+from typing import Any, BinaryIO, Optional, Tuple, Type\r
+from socket import SocketType\r
+import sys\r
+import types\r
+\r
+class BaseServer:\r
+    address_family = ...  # type: int\r
+    RequestHandlerClass = ...  # type: type\r
+    server_address = ...  # type: Tuple[str, int]\r
+    socket = ...  # type: SocketType\r
+    allow_reuse_address = ...  # type: bool\r
+    request_queue_size = ...  # type: int\r
+    socket_type = ...  # type: int\r
+    timeout = ...  # type: Optional[float]\r
+    def __init__(self, server_address: Tuple[str, int],\r
+                 RequestHandlerClass: type) -> None: ...\r
+    def fileno(self) -> int: ...\r
+    def handle_request(self) -> None: ...\r
+    def serve_forever(self, poll_interval: float = ...) -> None: ...\r
+    def shutdown(self) -> None: ...\r
+    def server_close(self) -> None: ...\r
+    def finish_request(self, request: bytes,\r
+                       client_address: Tuple[str, int]) -> None: ...\r
+    def get_request(self) -> None: ...\r
+    def handle_error(self, request: bytes,\r
+                     client_address: Tuple[str, int]) -> None: ...\r
+    def handle_timeout(self) -> None: ...\r
+    def process_request(self, request: bytes,\r
+                        client_address: Tuple[str, int]) -> None: ...\r
+    def server_activate(self) -> None: ...\r
+    def server_bind(self) -> None: ...\r
+    def verify_request(self, request: bytes,\r
+                       client_address: Tuple[str, int]) -> bool: ...\r
+    if sys.version_info >= (3, 6):\r
+        def __enter__(self) -> 'BaseServer': ...\r
+        def __exit__(self, exc_type: Optional[Type[BaseException]],\r
+                     exc_val: Optional[BaseException],\r
+                     exc_tb: Optional[types.TracebackType]) -> bool: ...\r
+    if sys.version_info >= (3, 3):\r
+        def service_actions(self) -> None: ...\r
+\r
+class TCPServer(BaseServer):\r
+    def __init__(self, server_address: Tuple[str, int],\r
+                 RequestHandlerClass: type,\r
+                 bind_and_activate: bool = ...) -> None: ...\r
+\r
+class UDPServer(BaseServer):\r
+    def __init__(self, server_address: Tuple[str, int],\r
+                 RequestHandlerClass: type,\r
+                 bind_and_activate: bool = ...) -> None: ...\r
+\r
+if sys.platform != 'win32':\r
+    class UnixStreamServer(BaseServer):\r
+        def __init__(self, server_address: Tuple[str, int],\r
+                     RequestHandlerClass: type,\r
+                     bind_and_activate: bool = ...) -> None: ...\r
+\r
+    class UnixDatagramServer(BaseServer):\r
+        def __init__(self, server_address: Tuple[str, int],\r
+                     RequestHandlerClass: type,\r
+                     bind_and_activate: bool = ...) -> None: ...\r
+\r
+class ForkingMixIn: ...\r
+class ThreadingMixIn: ...\r
+\r
+class ForkingTCPServer(ForkingMixIn, TCPServer): ...\r
+class ForkingUDPServer(ForkingMixIn, UDPServer): ...\r
+class ThreadingTCPServer(ThreadingMixIn, TCPServer): ...\r
+class ThreadingUDPServer(ThreadingMixIn, UDPServer): ...\r
+if sys.platform != 'win32':\r
+    class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ...\r
+    class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ...\r
+\r
+\r
+class BaseRequestHandler:\r
+    # Those are technically of types, respectively:\r
+    # * Union[SocketType, Tuple[bytes, SocketType]]\r
+    # * Union[Tuple[str, int], str]\r
+    # But there are some concerns that having unions here would cause\r
+    # too much inconvenience to people using it (see\r
+    # https://github.com/python/typeshed/pull/384#issuecomment-234649696)\r
+    request = ...  # type: Any\r
+    client_address = ...  # type: Any\r
+\r
+    server = ...  # type: BaseServer\r
+    def setup(self) -> None: ...\r
+    def handle(self) -> None: ...\r
+    def finish(self) -> None: ...\r
+\r
+class StreamRequestHandler(BaseRequestHandler):\r
+    rfile = ...  # type: BinaryIO\r
+    wfile = ...  # type: BinaryIO\r
+\r
+class DatagramRequestHandler(BaseRequestHandler):\r
+    rfile = ...  # type: BinaryIO\r
+    wfile = ...  # type: BinaryIO\r