https://github.com/python/cpython/commit/d85fa1af6a1e7889bcada7246144e4220428c44a
commit: d85fa1af6a1e7889bcada7246144e4220428c44a
branch: main
author: Jade <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-09-11T16:41:09+01:00
summary:
gh-115426: Fix cross-references to `socket.socket.close()` (#157295)
files:
M Doc/library/socket.rst
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index fb9249df4be33e..054ccc556740c2 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -1497,7 +1497,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 <fd_inheritance>`.
@@ -1544,7 +1544,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()
@@ -1769,7 +1769,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::
_______________________________________________
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]