https://github.com/python/cpython/commit/3bf0883d4f54797fa11872510a350d34909a6ea5
commit: 3bf0883d4f54797fa11872510a350d34909a6ea5
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-07-25T08:52:42+05:30
summary:

[3.15] gh-150952: Fix incorrect sock_sendto docstring (GH-150953) (#154626)

gh-150952: Fix incorrect sock_sendto docstring (GH-150953)
(cherry picked from commit 1c4440204f410b2839a44e83ac38cf52eafaadaa)

Co-authored-by: Timofei <[email protected]>

files:
M Lib/asyncio/selector_events.py

diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index f3d2f4eea4d1d9..b6ea2fc0fe045a 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -585,14 +585,10 @@ def _sock_sendall(self, fut, sock, view, pos):
             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:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to