Thanks to visit codestin.com
Credit goes to github.com

Skip to content

socket module shutdown() constants SHUT_RD, etc not included in Constants section #122519

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

Closed
jweaver-ca opened this issue Jul 31, 2024 · 6 comments
Labels
docs Documentation in the Doc dir easy

Comments

@jweaver-ca
Copy link

jweaver-ca commented Jul 31, 2024

Documentation

In documentation for socket module, the constants SHUT_RD, SHUT_WR, SHUT_RDWR are mentioned in the description for shutdown(), but they are missing from the Constants section on that page.

Linked PRs

@jweaver-ca jweaver-ca added the docs Documentation in the Doc dir label Jul 31, 2024
@picnixz picnixz added the easy label Jul 31, 2024
@picnixz
Copy link
Member

picnixz commented Jul 31, 2024

We don't document all of them one by one, but I think we can document them using SHUT_* like that.

@Damien-Chen
Copy link
Contributor

Hi @picnixz,
you means adding SHUT_* in the below field ?
image

@picnixz
Copy link
Member

picnixz commented Jul 31, 2024

Mmh, perhaps not. Those (that you show) are generally used in arguments to the setsockopt() and getsockopt(). A dedicated category could be made for the SHUT_* constants, like for https://docs.python.org/3/library/socket.html#socket.SIO_RCVALL (it's a group of 3 constants for a specific function).

@Damien-Chen
Copy link
Contributor

Ok, so make a category like the below and mention these argument are used to the socket.shutdown() method of socket object.
SHUT_RD
SHUT_WR
SHUT_RDWR

If my understanding is right ?
Thank you.

@picnixz
Copy link
Member

picnixz commented Jul 31, 2024

Yes, something like that. Best is to see how the other constants are documented when they are grouped. You'll need to update the links to those constants as well.

@Damien-Chen
Copy link
Contributor

I made a preliminary modification on documention, please help me check if there is anything need to change, thank you very much!

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 17, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 17, 2024
kumaraditya303 pushed a commit that referenced this issue Aug 17, 2024
…on (GH-122543) (#123094)

gh-122519: Adding socket module shutdown() constants description (GH-122543)
(cherry picked from commit 8a59dec)

Co-authored-by: Damien <[email protected]>
kumaraditya303 pushed a commit that referenced this issue Aug 17, 2024
…on (GH-122543) (#123093)

gh-122519: Adding socket module shutdown() constants description (GH-122543)
(cherry picked from commit 8a59dec)

Co-authored-by: Damien <[email protected]>
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 easy
Projects
None yet
Development

No branches or pull requests

4 participants