diff --git a/stdlib/asyncio/base_events.pyi b/stdlib/asyncio/base_events.pyi index 6ff3c2c9f..8af829d4f 100644 --- a/stdlib/asyncio/base_events.pyi +++ b/stdlib/asyncio/base_events.pyi @@ -342,8 +342,8 @@ class BaseEventLoop(AbstractEventLoop): async def create_datagram_endpoint( # type: ignore[override] self, protocol_factory: Callable[[], _ProtocolT], - local_addr: tuple[str, int] | None = None, - remote_addr: tuple[str, int] | None = None, + local_addr: tuple[str, int] | str | None = None, + remote_addr: tuple[str, int] | str | None = None, *, family: int = 0, proto: int = 0, @@ -356,8 +356,8 @@ class BaseEventLoop(AbstractEventLoop): async def create_datagram_endpoint( self, protocol_factory: Callable[[], _ProtocolT], - local_addr: tuple[str, int] | None = ..., - remote_addr: tuple[str, int] | None = ..., + local_addr: tuple[str, int] | str | None = ..., + remote_addr: tuple[str, int] | str | None = ..., *, family: int = ..., proto: int = ..., diff --git a/stdlib/asyncio/events.pyi b/stdlib/asyncio/events.pyi index fd8213f55..aa2098281 100644 --- a/stdlib/asyncio/events.pyi +++ b/stdlib/asyncio/events.pyi @@ -495,8 +495,8 @@ class AbstractEventLoop: async def create_datagram_endpoint( self, protocol_factory: Callable[[], _ProtocolT], - local_addr: tuple[str, int] | None = None, - remote_addr: tuple[str, int] | None = None, + local_addr: tuple[str, int] | str | None = None, + remote_addr: tuple[str, int] | str | None = None, *, family: int = 0, proto: int = 0,