https://github.com/python/cpython/commit/6bc3e830a518112a4e242217807681e3908602f4
commit: 6bc3e830a518112a4e242217807681e3908602f4
branch: main
author: RUANG (James Roy) <[email protected]>
committer: encukou <[email protected]>
date: 2024-12-04T14:30:38+01:00
summary:
gh-127481: Add `EPOLLWAKEUP` to the `select` module (GH-127482)
files:
A Misc/NEWS.d/next/Library/2024-12-01-23-18-43.gh-issue-127481.K36AoP.rst
M Doc/library/select.rst
M Modules/selectmodule.c
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
index f23a249f44b485..4fcff9198944a8 100644
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -317,11 +317,17 @@ Edge and Level Trigger Polling (epoll) Objects
+-------------------------+-----------------------------------------------+
| :const:`EPOLLMSG` | Ignored. |
+-------------------------+-----------------------------------------------+
+ | :const:`EPOLLWAKEUP` | Prevents sleep during event waiting. |
+ +-------------------------+-----------------------------------------------+
.. versionadded:: 3.6
:const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel
4.5
or later.
+ .. versionadded:: next
+ :const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
+ or later.
+
.. method:: epoll.close()
Close the control file descriptor of the epoll object.
diff --git
a/Misc/NEWS.d/next/Library/2024-12-01-23-18-43.gh-issue-127481.K36AoP.rst
b/Misc/NEWS.d/next/Library/2024-12-01-23-18-43.gh-issue-127481.K36AoP.rst
new file mode 100644
index 00000000000000..8ada0b57ddc257
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-12-01-23-18-43.gh-issue-127481.K36AoP.rst
@@ -0,0 +1 @@
+Add the ``EPOLLWAKEUP`` constant to the :mod:`select` module.
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 6ced71cca73178..e14e114a6dafd0 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -2715,6 +2715,10 @@ _select_exec(PyObject *m)
#ifdef EPOLLMSG
ADD_INT(EPOLLMSG);
#endif
+#ifdef EPOLLWAKEUP
+ /* Kernel 3.5+ */
+ ADD_INT(EPOLLWAKEUP);
+#endif
#ifdef EPOLL_CLOEXEC
ADD_INT(EPOLL_CLOEXEC);
_______________________________________________
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]