From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 25 Jul 2026 03:21:58 +0000 (+0200) Subject: [3.13] gh-150952: Fix incorrect sock_sendto docstring (GH-150953) (#154624) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=de9dafa66d6bffeb21aaf2883ec0433c89883ced;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-150952: Fix incorrect sock_sendto docstring (GH-150953) (#154624) gh-150952: Fix incorrect sock_sendto docstring (GH-150953) (cherry picked from commit 1c4440204f410b2839a44e83ac38cf52eafaadaa) Co-authored-by: Timofei <128279579+deadlovelll@users.noreply.github.com> --- diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index 5c07f5d31c5a..0c96e81cce0b 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -582,14 +582,10 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop): pos[0] = start async def sock_sendto(self, sock, data, address): - """Send data to the socket. + """Send a datagram from sock to address. - The socket must be connected to a remote socket. This method - continues to send data from data until either all data has been - sent or an error occurs. None is returned on success. On error, - an exception is raised, and there is no way to determine how much - data, if any, was successfully processed by the receiving end of - the connection. + The socket does not have to be connected. This method sends the + whole datagram in a single call. Return the number of bytes sent. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: