Skip to content

Commit e248359

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 cdc4849 commit e248359

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
@@ -1369,7 +1369,7 @@ Socket Objects
13691369
of :meth:`socket.getpeername` but not the actual OS resource. Unlike
13701370
:func:`socket.fromfd`, *fileno* will return the same socket and not a
13711371
duplicate. This may help close a detached socket using
1372-
:meth:`socket.close`.
1372+
:meth:`~socket.socket.close`.
13731373

13741374
The newly created socket is :ref:`non-inheritable <fd_inheritance>`.
13751375

@@ -1416,7 +1416,7 @@ Socket Objects
14161416

14171417
.. versionchanged:: 3.2
14181418
Support for the :term:`context manager` protocol was added. Exiting the
1419-
context manager is equivalent to calling :meth:`~socket.close`.
1419+
context manager is equivalent to calling :meth:`~socket.socket.close`.
14201420

14211421

14221422
.. method:: accept()
@@ -1641,7 +1641,7 @@ Socket Objects
16411641

16421642
Closing the file object returned by :meth:`makefile` won't close the
16431643
original socket unless all other file objects have been closed and
1644-
:meth:`socket.close` has been called on the socket object.
1644+
:meth:`~socket.socket.close` has been called on the socket object.
16451645

16461646
.. note::
16471647

0 commit comments

Comments
 (0)