]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 10 Jun 2026 13:09:28 +0000 (15:09 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Jun 2026 13:09:28 +0000 (13:09 +0000)
commitde5da36c6622a47b9347386e9c5ad2a7e16ab43b
treef6f007dad26e2068bad6ee9c82c0b48592c8f1b3
parent7201b9d18f2f94906bb9d75f59ad9d4696d7a68f
[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)

gh-89554: Document socket.SocketType as a class (GH-150683)

socket.SocketType is a class (re-exported from _socket as an alias of
_socket.socket, the base class of socket.socket), but was documented with
the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", correct the misleading description
(SocketType is the base class of the socket type, not "type(socket(...))"
which is socket.socket; addresses gh-88427), move it into the Socket
Objects section, and document the socket object methods and attributes
nested under the socket class, dropping the redundant "socket." prefix.
(cherry picked from commit a621e8ad811e7d51d69b0969a2bd07888a02db1e)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
Doc/library/socket.rst