Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion stdlib/3/socketserver.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stubs for socketserver

from typing import BinaryIO, Optional, Tuple
from typing import Any, BinaryIO, Optional, Tuple
from socket import SocketType
import sys
import types
Expand Down Expand Up @@ -68,7 +68,18 @@ class ForkingUDPServer(ForkingMixIn, UDPServer): ...
class ThreadingTCPServer(ThreadingMixIn, TCPServer): ...
class ThreadingUDPServer(ThreadingMixIn, UDPServer): ...


class BaseRequestHandler:
# Those are technically of types, respectively:
# * Union[SocketType, Tuple[bytes, SocketType]]
# * Union[Tuple[str, int], str]
# But there are some concerns that having unions here would cause
# too much inconvenience to people using it (see
# https://github.com/python/typeshed/pull/384#issuecomment-234649696)
request = ... # type: Any
client_address = ... # type: Any

server = ... # type: BaseServer
def setup(self) -> None: ...
def handle(self) -> None: ...
def finish(self) -> None: ...
Expand Down