Skip to content

Commit ef642e0

Browse files
committed
UDPServer inherits from TCPServer
This is documented and implemented as such, and means that the signatures of some of the methods (notably __init__) actually differ from those on BaseServer.
1 parent 0a58eb8 commit ef642e0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

stdlib/socketserver.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,9 @@ class TCPServer(BaseServer):
8181
) -> None: ...
8282
def get_request(self) -> tuple[_socket, Any]: ...
8383

84-
class UDPServer(BaseServer):
85-
if sys.version_info >= (3, 11):
86-
allow_reuse_port: bool
84+
class UDPServer(TCPServer):
8785
max_packet_size: ClassVar[int]
88-
def get_request(self) -> tuple[tuple[bytes, _socket], Any]: ...
86+
def get_request(self) -> tuple[tuple[bytes, _socket], Any]: ... # type: ignore[override]
8987

9088
if sys.platform != "win32":
9189
class UnixStreamServer(BaseServer):

0 commit comments

Comments
 (0)