https://github.com/python/cpython/commit/9efded46646ae25de8e8c6fdef85f2f7d188dfd3
commit: 9efded46646ae25de8e8c6fdef85f2f7d188dfd3
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-07-13T15:39:39+05:30
summary:

[3.15] gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651) 
(#153652)

gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651)
(cherry picked from commit 1fece4457032382947c7c2a5c9e95dc106ca7a7d)

Co-authored-by: Kumar Aditya <[email protected]>

files:
M Doc/library/asyncio-eventloop.rst

diff --git a/Doc/library/asyncio-eventloop.rst 
b/Doc/library/asyncio-eventloop.rst
index 79c9516cda2d60b..865f5e3be39a868 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -1156,12 +1156,21 @@ convenient.
 
    *sock* must be a non-blocking socket.
 
+   With :class:`SelectorEventLoop`, *address* does not need to be resolved:
+   for :const:`~socket.AF_INET` and :const:`~socket.AF_INET6` sockets,
+   ``sock_connect`` first checks whether *address* is already resolved by
+   calling :func:`socket.inet_pton`, and uses :meth:`loop.getaddrinfo` to
+   resolve it if it is not.
+
+   :class:`ProactorEventLoop`, the default event loop on Windows, does not
+   resolve *address*.  The host must already be a numeric IP address; passing
+   a host name raises :exc:`OSError`.  Resolve the address with
+   :meth:`loop.getaddrinfo` first, or use :meth:`loop.create_connection`,
+   which resolves the address on every platform.
+
    .. versionchanged:: 3.5.2
-      ``address`` no longer needs to be resolved.  ``sock_connect``
-      will try to check if the *address* is already resolved by calling
-      :func:`socket.inet_pton`.  If not,
-      :meth:`loop.getaddrinfo` will be used to resolve the
-      *address*.
+      With :class:`SelectorEventLoop`, ``address`` no longer needs to be
+      resolved.
 
    .. seealso::
 

_______________________________________________
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