-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
gh-141817: Add IPV6_HDRINCL constant to the socket module #141818
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
Conversation
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Misc/NEWS.d/next/Library/2025-11-21-21-14-10.gh-issue-141817._v5LdB.rst
Outdated
Show resolved
Hide resolved
…v5LdB.rst Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
There are a bunch more constants not currently in the socket module. I made a list here: https://discuss.python.org/t/adding-new-socket-options-specifically-socket-ipv6-hdrincl/104964/2 Do we want to add more? |
|
Looking at the constants that were found, I think all |
The script retains I'd be inclined to include all of the socket option flags, since they can be useful without any additional support. Most of them get/set integers (in a lot of cases, they're just booleans), and even the ones that aren't, there's ways to use those in Python without help. I've no idea what IPV6_FL_* and IPV6_TLV_* are all about, so we could omit those until such time as someone asks about them. |
|
PR merged, thank you. |
I replied there: https://discuss.python.org/t/adding-new-socket-options-specifically-socket-ipv6-hdrincl/104964/5 |
Add the
socket.IPV6_HDRINCLconstant on platforms that support it.There are a lot more constants that could also be added. How far should this be taken?
📚 Documentation preview 📚: https://cpython-previews--141818.org.readthedocs.build/