From 93fdf4366a9bfe1336892d0388c56d0e03b2f8aa Mon Sep 17 00:00:00 2001 From: AN Long Date: Mon, 28 Jul 2025 19:55:59 +0900 Subject: [PATCH] gh-119711: describe `create_datagram_endpoint`'s behavior in asyncio when `local_addr` is `None` (GH-136913) (cherry picked from commit 1481384141342479b3ba4b89f653b4e5bef0d272) Co-authored-by: AN Long --- Doc/library/asyncio-eventloop.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 91970c282391f7..9561c40776f01c 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -611,6 +611,12 @@ Opening network connections to bind the socket locally. The *local_host* and *local_port* are looked up using :meth:`getaddrinfo`. + .. note:: + + On Windows, when using the proactor event loop with ``local_addr=None``, + an :exc:`OSError` with :attr:`!errno.WSAEINVAL` will be raised + when running it. + * *remote_addr*, if given, is a ``(remote_host, remote_port)`` tuple used to connect the socket to a remote address. The *remote_host* and *remote_port* are looked up using :meth:`getaddrinfo`.