]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89554: Document socket.SocketType as a class (#150683)
authorBernát Gábor <gaborjbernat@gmail.com>
Wed, 10 Jun 2026 13:01:01 +0000 (06:01 -0700)
committerGitHub <noreply@github.com>
Wed, 10 Jun 2026 13:01:01 +0000 (15:01 +0200)
commita621e8ad811e7d51d69b0969a2bd07888a02db1e
tree0f39ac02fcd8ea95cd500b2d343e166e3589841b
parent44a533fa1b5485b397d87edf9698c59f20765885
gh-89554: Document socket.SocketType as a class (#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.
Doc/library/socket.rst