Skip to content

[3.15] gh-89554: Document socket.SocketType as a class (GH-150683)#151244

Merged
vstinner merged 1 commit into
python:3.15from
miss-islington:backport-a621e8a-3.15
Jun 10, 2026
Merged

[3.15] gh-89554: Document socket.SocketType as a class (GH-150683)#151244
vstinner merged 1 commit into
python:3.15from
miss-islington:backport-a621e8a-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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 a621e8a)

Co-authored-by: Bernát Gábor gaborjbernat@gmail.com

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 pythongh-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 a621e8a)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Jun 10, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 10, 2026
@vstinner vstinner enabled auto-merge (squash) June 10, 2026 13:02
@vstinner vstinner merged commit de5da36 into python:3.15 Jun 10, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 10, 2026
@miss-islington miss-islington deleted the backport-a621e8a-3.15 branch June 10, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants