https://github.com/python/cpython/commit/f21ed37daf95c8100688b5a41b1094dd18517375
commit: f21ed37daf95c8100688b5a41b1094dd18517375
branch: main
author: Chris Angelico <[email protected]>
committer: vstinner <[email protected]>
date: 2025-11-22T18:07:21+01:00
summary:

gh-141817: Add IPV6_HDRINCL constant to the socket module (#141818)

Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>

files:
A Misc/NEWS.d/next/Library/2025-11-21-21-14-10.gh-issue-141817._v5LdB.rst
M Doc/library/socket.rst
M Modules/socketmodule.c

diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 89bca9b5b20df7..976136885eac1b 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -482,6 +482,9 @@ The AF_* and SOCK_* constants are now 
:class:`AddressFamily` and
    .. versionchanged:: 3.14
       Added support for ``TCP_QUICKACK`` on Windows platforms when available.
 
+   .. versionchanged:: next
+      ``IPV6_HDRINCL`` was added.
+
 
 .. data:: AF_CAN
           PF_CAN
diff --git 
a/Misc/NEWS.d/next/Library/2025-11-21-21-14-10.gh-issue-141817._v5LdB.rst 
b/Misc/NEWS.d/next/Library/2025-11-21-21-14-10.gh-issue-141817._v5LdB.rst
new file mode 100644
index 00000000000000..774e13b2129f8c
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-11-21-21-14-10.gh-issue-141817._v5LdB.rst
@@ -0,0 +1 @@
+Add :data:`!socket.IPV6_HDRINCL` constant.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 6a844d44bf085b..1ef359cb265ed4 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -8901,6 +8901,9 @@ socket_exec(PyObject *m)
 #ifdef IPV6_HOPLIMIT
     ADD_INT_MACRO(m, IPV6_HOPLIMIT);
 #endif
+#ifdef IPV6_HDRINCL
+    ADD_INT_MACRO(m, IPV6_HDRINCL);
+#endif
 #ifdef IPV6_HOPOPTS
     ADD_INT_MACRO(m, IPV6_HOPOPTS);
 #endif

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to