Skip to content

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

Merged
vstinner merged 1 commit into
python:3.14from
vstinner:socket14
Jun 10, 2026
Merged

[3.14] gh-89554: Document socket.SocketType as a class (#150683)#151245
vstinner merged 1 commit into
python:3.14from
vstinner:socket14

Conversation

@vstinner

@vstinner vstinner commented Jun 10, 2026

Copy link
Copy Markdown
Member

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)

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)
@vstinner vstinner merged commit 4ef6a37 into python:3.14 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
@vstinner vstinner deleted the socket14 branch June 10, 2026 13:51
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 4ef6a375a15adf76361a73f3c7074350e23e53ba 3.13

@bedevere-app

bedevere-app Bot commented Jun 10, 2026

Copy link
Copy Markdown

GH-151254 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jun 10, 2026
vstinner added a commit that referenced this pull request Jun 10, 2026
#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 a621e8a)


(cherry picked from commit 4ef6a37)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
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.

2 participants