Skip to content

Commit b3d94de

Browse files
jang-hsmiss-islington
authored andcommitted
gh-115426: Fix cross-references to socket.socket.close() (GH-157295)
(cherry picked from commit d85fa1a) Co-authored-by: Jade <68784313+jang-hs@users.noreply.github.com>
1 parent 090b5cd commit b3d94de

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/socket.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ Socket Objects
14941494
of :meth:`socket.getpeername` but not the actual OS resource. Unlike
14951495
:func:`socket.fromfd`, *fileno* will return the same socket and not a
14961496
duplicate. This may help close a detached socket using
1497-
:meth:`socket.close`.
1497+
:meth:`~socket.socket.close`.
14981498

14991499
The newly created socket is :ref:`non-inheritable <fd_inheritance>`.
15001500

@@ -1541,7 +1541,7 @@ Socket Objects
15411541

15421542
.. versionchanged:: 3.2
15431543
Support for the :term:`context manager` protocol was added. Exiting the
1544-
context manager is equivalent to calling :meth:`~socket.close`.
1544+
context manager is equivalent to calling :meth:`~socket.socket.close`.
15451545

15461546

15471547
.. method:: accept()
@@ -1766,7 +1766,7 @@ Socket Objects
17661766

17671767
Closing the file object returned by :meth:`makefile` won't close the
17681768
original socket unless all other file objects have been closed and
1769-
:meth:`socket.close` has been called on the socket object.
1769+
:meth:`~socket.socket.close` has been called on the socket object.
17701770

17711771
.. note::
17721772

0 commit comments

Comments
 (0)