From acce40c79e5661e61d125d8e068fa6aaf50cc3d8 Mon Sep 17 00:00:00 2001 From: Jade <68784313+jang-hs@users.noreply.github.com> Date: Sat, 12 Sep 2026 00:41:09 +0900 Subject: [PATCH] gh-115426: Fix cross-references to `socket.socket.close()` (GH-157295) (cherry picked from commit d85fa1af6a1e7889bcada7246144e4220428c44a) Co-authored-by: Jade <68784313+jang-hs@users.noreply.github.com> --- Doc/library/socket.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 71f5fb6ab0cc75..d1a332f74e0370 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1481,7 +1481,7 @@ Socket Objects of :meth:`socket.getpeername` but not the actual OS resource. Unlike :func:`socket.fromfd`, *fileno* will return the same socket and not a duplicate. This may help close a detached socket using - :meth:`socket.close`. + :meth:`~socket.socket.close`. The newly created socket is :ref:`non-inheritable `. @@ -1528,7 +1528,7 @@ Socket Objects .. versionchanged:: 3.2 Support for the :term:`context manager` protocol was added. Exiting the - context manager is equivalent to calling :meth:`~socket.close`. + context manager is equivalent to calling :meth:`~socket.socket.close`. .. method:: accept() @@ -1753,7 +1753,7 @@ Socket Objects Closing the file object returned by :meth:`makefile` won't close the original socket unless all other file objects have been closed and - :meth:`socket.close` has been called on the socket object. + :meth:`~socket.socket.close` has been called on the socket object. .. note::