The Wayback Machine - https://web.archive.org/web/20250611022155/https://github.com/python/cpython/pull/28029
Skip to content

DOC: remove documentation for non-existing socket class attributes #28029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Aug 29, 2021

The module-level functions if_nameindex, if_nametoindex and if_indextoname were documented as existing on the class.

import socket
s = socket.socket()
s.if_nameindex()  # AttributeError
socket.if_nameindex()
# Prints the expected result

Does this qualify as a "small documentation fix" that needs no issue, or should I open a corresponding issue.

Note the documentation is a bit confusing since it is not clear that the socket prefix here refers to the module, not the object. The object docs start a few lines down. So the rst docs need no fixes.

@miss-islington
Copy link
Contributor

Thanks @mattip for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @mattip for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-28221 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Sep 7, 2021
@bedevere-bot
Copy link

GH-28222 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 7, 2021
…GH-28029)

The functions in question are available on the module-level only.
(cherry picked from commit 34d82ce)

Co-authored-by: Matti Picus <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 7, 2021
…GH-28029)

The functions in question are available on the module-level only.
(cherry picked from commit 34d82ce)

Co-authored-by: Matti Picus <[email protected]>
@ambv
Copy link
Contributor

ambv commented Sep 7, 2021

Thanks for the fix, Matti! ✨ 🍰 ✨

ambv pushed a commit that referenced this pull request Sep 7, 2021
…) (GH-28221)

The functions in question are available on the module-level only.
(cherry picked from commit 34d82ce)

Co-authored-by: Matti Picus <[email protected]>
miss-islington added a commit that referenced this pull request Sep 7, 2021
The functions in question are available on the module-level only.
(cherry picked from commit 34d82ce)

Co-authored-by: Matti Picus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants