Skip to content

asyncio: DatagramProtocol.datagram_received has incorrect annotation for addr parameter #15169

@BenjyWiener

Description

@BenjyWiener

DatagramProtocol.datagram_received is annotated as:

def datagram_received(self, data: bytes, addr: tuple[str | Any, int]) -> None: ...

However, when using IPv6, the type of addr will be tuple[str, int, int, int] ((host, port, flowinfo, scope_id)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions