Skip to content

Fix UDPServer to correctly inherit from TCPServer #8542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 13, 2022
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
9 changes: 4 additions & 5 deletions stdlib/socketserver.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class BaseServer:
def close_request(self, request: _RequestType) -> None: ... # undocumented

class TCPServer(BaseServer):
allow_reuse_port: bool
if sys.version_info >= (3, 11):
allow_reuse_port: bool
request_queue_size: int
def __init__(
self: Self,
Expand All @@ -80,11 +81,9 @@ class TCPServer(BaseServer):
) -> None: ...
def get_request(self) -> tuple[_socket, Any]: ...

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

if sys.platform != "win32":
class UnixStreamServer(BaseServer):
Expand Down