gh-141817: Add IPV6_HDRINCL constant to the socket module#141818
gh-141817: Add IPV6_HDRINCL constant to the socket module#141818vstinner merged 4 commits intopython:mainfrom
Conversation
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 |
…on#141818) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…on#141818) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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/