]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13][3.14] gh-89554: Document socket.SocketType as a class (#150683) (#151245)...
authorVictor Stinner <vstinner@python.org>
Wed, 10 Jun 2026 17:02:34 +0000 (19:02 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Jun 2026 17:02:34 +0000 (19:02 +0200)
commita1f43ef9d92975b56f0926eb3bc903dc360e12c0
treef1dc4d0bef839f03266a6255c8a3b6bf5370c2cb
parent4866da0802200b688132e40662741125d6192f27
[3.13][3.14] gh-89554: Document socket.SocketType as a class (#150683) (#151245) (#151254)

[3.14] gh-89554: Document socket.SocketType as a class (#150683) (#151245)

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.

Backport to 3.13: Replace ":platform: Windows" with
".. availability:: Windows" in ioctl() method.

(cherry picked from commit a621e8ad811e7d51d69b0969a2bd07888a02db1e)

(cherry picked from commit 4ef6a375a15adf76361a73f3c7074350e23e53ba)

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