diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index e87ba193ce40..9f247b0533a7 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -61,9 +61,6 @@ pickle.Pickler.reducer_override # implemented in C pickler select.poll # Depends on configuration selectors.DevpollSelector # Depends on configuration shutil.rmtree # stubtest doesn't like that we have this as an instance of a callback protocol instead of a function -socketserver.BaseServer.fileno # implemented in derived classes -socketserver.BaseServer.get_request # implemented in derived classes -socketserver.BaseServer.server_bind # implemented in derived classes ssl.Purpose.__new__ # the multiple inheritance confuses mypy tarfile.TarFile.errors # errors is initialized for some reason as None even though it really only accepts str tkinter.simpledialog.[A-Z_]+ @@ -435,6 +432,9 @@ multiprocessing.pool.Pool.__del__ # C signature is broader than what is actually accepted _?queue.SimpleQueue.__init__ +# Not implemented, but expected to exist on subclasses. +socketserver.BaseServer.get_request + # Items that depend on the existence and flags of SSL imaplib.IMAP4_SSL.ssl ssl.PROTOCOL_SSLv2 diff --git a/stdlib/socketserver.pyi b/stdlib/socketserver.pyi index ae6575d85082..9c4d308f44db 100644 --- a/stdlib/socketserver.pyi +++ b/stdlib/socketserver.pyi @@ -49,18 +49,16 @@ class BaseServer: def __init__( self, server_address: _Address, RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler] ) -> None: ... - def fileno(self) -> int: ... def handle_request(self) -> None: ... def serve_forever(self, poll_interval: float = 0.5) -> None: ... def shutdown(self) -> None: ... def server_close(self) -> None: ... def finish_request(self, request: _RequestType, client_address: _RetAddress) -> None: ... - def get_request(self) -> tuple[Any, Any]: ... + def get_request(self) -> tuple[Any, Any]: ... # Not implemented here, but expected to exist on subclasses def handle_error(self, request: _RequestType, client_address: _RetAddress) -> None: ... def handle_timeout(self) -> None: ... def process_request(self, request: _RequestType, client_address: _RetAddress) -> None: ... def server_activate(self) -> None: ... - def server_bind(self) -> None: ... def verify_request(self, request: _RequestType, client_address: _RetAddress) -> bool: ... def __enter__(self) -> Self: ... def __exit__( @@ -80,7 +78,9 @@ class TCPServer(BaseServer): RequestHandlerClass: Callable[[Any, _RetAddress, Self], BaseRequestHandler], bind_and_activate: bool = True, ) -> None: ... + def fileno(self) -> int: ... def get_request(self) -> tuple[_socket, _RetAddress]: ... + def server_bind(self) -> None: ... class UDPServer(TCPServer): max_packet_size: ClassVar[int]