Skip to content

gh-71566: Fix SocketType introduction in the socket documentation. - #93288

Open
xiaochen7 wants to merge 6 commits into
python:mainfrom
xiaochen7:gh-71566
Open

gh-71566: Fix SocketType introduction in the socket documentation.#93288
xiaochen7 wants to merge 6 commits into
python:mainfrom
xiaochen7:gh-71566

Conversation

@xiaochen7

@xiaochen7xiaochen7 commented May 27, 2022

Copy link
Copy Markdown
Contributor

In the previous commit, SocketType was changed to the base class for the socket object type.

The purpose of this PR is to align the documentation with the above modifications.

@ghost

ghost commented May 27, 2022

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bedevere-botbedevere-bot added docs Documentation in the Doc dir awaiting review labels May 27, 2022
@AA-Turner

Copy link
Copy Markdown
Member

You don't need NEWS, please delete it.

A

@AA-TurnerAA-Turner added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels May 27, 2022

@AA-TurnerAA-Turner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two wording suggestions.

A

Comment threadDoc/library/socket.rst Outdated
Comment on lines +829 to +830
This is the base class for a type object of socket objects, and
``isinstance(socket(...), SocketType)`` returns ``True``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is the base class for a type object of socket objects, and
``isinstance(socket(...), SocketType)`` returns ``True``.
This is the base class for socket objects, such that
``isinstance(socket(...), SocketType)`` is ``True``.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your professional advice. As we can see, socket.SocketType is the base class for the type object socket.socket. Consider that elsewhere in this document socket object refers to an instance of the type object socket.socket. Wouldn't it be less precise if we just said that SocketType is the base class of socket objects? Looking forward to your more suggestions.

Comment threadDoc/library/socket.rst Outdated
``isinstance(socket(...), SocketType)`` returns ``True``.

.. versionchanged:: 3.0
SocketType is now the base class for the socket object type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SocketType is now the base class for the socket object type.
SocketType is the base class for socket objects
rather than being ``type(socket(...))``` directly.

@serhiy-storchakaserhiy-storchaka added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes and removed needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels May 9, 2024
@hugovkhugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025

.. versionchanged:: 3.0
SocketType is the base class for the socket object type rather than
being ``type(socket(...))``` directly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a RST marker error:

Suggested change
being ``type(socket(...))``` directly.
being ``type(socket(...))`` directly.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label Apr 11, 2026
@serhiy-storchakaserhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actionsgithub-actionsBot removed the stale Stale PR or inactive for long period of time. label Jun 5, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core reviewdocsDocumentation in the Doc dirneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixesneeds backport to 3.15pre-release feature fixes, bugs and security fixesskip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

8 participants

@xiaochen7@bedevere-bot@AA-Turner@aisk@hugovk@serhiy-storchaka@willingc@StanFromIreland