https://github.com/python/cpython/commit/314f4b9716c2a3f49f7834d1e12bb2ee6c24a588
commit: 314f4b9716c2a3f49f7834d1e12bb2ee6c24a588
branch: main
author: Alyssa Ross <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-04-26T20:54:12+03:00
summary:
gh-132991: Add socket.IP_FREEBIND constant (GH-132998)
files:
A Misc/NEWS.d/next/Library/2025-04-26-10-57-15.gh-issue-132991.ekkqdt.rst
M Doc/library/socket.rst
M Modules/socketmodule.c
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index d3f94016937a24..3c8dc26138f988 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -476,8 +476,8 @@ Constants
network interface instead of its name.
.. versionchanged:: 3.14
- Added missing ``IP_RECVERR``, ``IPV6_RECVERR``, ``IP_RECVTTL``, and
- ``IP_RECVORIGDSTADDR`` on Linux.
+ Added missing ``IP_FREEBIND``, ``IP_RECVERR``, ``IPV6_RECVERR``,
+ ``IP_RECVTTL``, and ``IP_RECVORIGDSTADDR`` on Linux.
.. versionchanged:: 3.14
Added support for ``TCP_QUICKACK`` on Windows platforms when available.
diff --git
a/Misc/NEWS.d/next/Library/2025-04-26-10-57-15.gh-issue-132991.ekkqdt.rst
b/Misc/NEWS.d/next/Library/2025-04-26-10-57-15.gh-issue-132991.ekkqdt.rst
new file mode 100644
index 00000000000000..f462dac34ce664
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-04-26-10-57-15.gh-issue-132991.ekkqdt.rst
@@ -0,0 +1 @@
+Add :data:`!socket.IP_FREEBIND` constant on Linux 2.4 and later.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index a4176f907bf828..d5525c4eb3bfc0 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -8829,6 +8829,9 @@ socket_exec(PyObject *m)
#ifdef IP_MAX_MEMBERSHIPS
ADD_INT_MACRO(m, IP_MAX_MEMBERSHIPS);
#endif
+#ifdef IP_FREEBIND
+ ADD_INT_MACRO(m, IP_FREEBIND);
+#endif
#ifdef IP_TRANSPARENT
ADD_INT_MACRO(m, IP_TRANSPARENT);
#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]