[Python-checkins] [3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)

taleinat webhook-mailer at python.org
Fri Jan 21 04:37:45 EST 2022


https://github.com/python/cpython/commit/656971e4953a70a6048170377888db5530eea0a6
commit: 656971e4953a70a6048170377888db5530eea0a6
branch: 3.9
author: Tal Einat <532281+taleinat at users.noreply.github.com>
committer: taleinat <532281+taleinat at users.noreply.github.com>
date: 2022-01-21T11:37:39+02:00
summary:

[3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)

(cherry picked from commit 27df7566bc19699b967e0e30d7808637b90141f6)

Co-authored-by: Zane Bitter <zbitter at redhat.com>

files:
M Modules/clinic/selectmodule.c.h
M Modules/selectmodule.c

diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h
index c1072e6ef9430..7791af8f93143 100644
--- a/Modules/clinic/selectmodule.c.h
+++ b/Modules/clinic/selectmodule.c.h
@@ -193,6 +193,10 @@ PyDoc_STRVAR(select_poll_poll__doc__,
 "\n"
 "Polls the set of registered file descriptors.\n"
 "\n"
+"  timeout\n"
+"    The maximum time to wait in milliseconds, or else None (or a negative\n"
+"    value) to wait indefinitely.\n"
+"\n"
 "Returns a list containing any descriptors that have events or errors to\n"
 "report, as a list of (fd, event) 2-tuples.");
 
@@ -363,6 +367,10 @@ PyDoc_STRVAR(select_devpoll_poll__doc__,
 "\n"
 "Polls the set of registered file descriptors.\n"
 "\n"
+"  timeout\n"
+"    The maximum time to wait in milliseconds, or else None (or a negative\n"
+"    value) to wait indefinitely.\n"
+"\n"
 "Returns a list containing any descriptors that have events or errors to\n"
 "report, as a list of (fd, event) 2-tuples.");
 
@@ -1219,4 +1227,4 @@ select_kqueue_control(kqueue_queue_Object *self, PyObject *const *args, Py_ssize
 #ifndef SELECT_KQUEUE_CONTROL_METHODDEF
     #define SELECT_KQUEUE_CONTROL_METHODDEF
 #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
-/*[clinic end generated code: output=ef42c3485a8fe3a0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d78e30f231a926d6 input=a9049054013a1b77]*/
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index fb71e9196f32a..d4af4f7b52db4 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -580,6 +580,8 @@ select_poll_unregister_impl(pollObject *self, int fd)
 select.poll.poll
 
     timeout as timeout_obj: object = None
+      The maximum time to wait in milliseconds, or else None (or a negative
+      value) to wait indefinitely.
     /
 
 Polls the set of registered file descriptors.
@@ -590,7 +592,7 @@ report, as a list of (fd, event) 2-tuples.
 
 static PyObject *
 select_poll_poll_impl(pollObject *self, PyObject *timeout_obj)
-/*[clinic end generated code: output=876e837d193ed7e4 input=7a446ed45189e894]*/
+/*[clinic end generated code: output=876e837d193ed7e4 input=c2f6953ec45e5622]*/
 {
     PyObject *result_list = NULL;
     int poll_result, i, j;
@@ -911,6 +913,8 @@ select_devpoll_unregister_impl(devpollObject *self, int fd)
 /*[clinic input]
 select.devpoll.poll
     timeout as timeout_obj: object = None
+      The maximum time to wait in milliseconds, or else None (or a negative
+      value) to wait indefinitely.
     /
 
 Polls the set of registered file descriptors.
@@ -921,7 +925,7 @@ report, as a list of (fd, event) 2-tuples.
 
 static PyObject *
 select_devpoll_poll_impl(devpollObject *self, PyObject *timeout_obj)
-/*[clinic end generated code: output=2654e5457cca0b3c input=fd0db698d84f0333]*/
+/*[clinic end generated code: output=2654e5457cca0b3c input=3c3f0a355ec2bedb]*/
 {
     struct dvpoll dvp;
     PyObject *result_list = NULL;



More information about the Python-checkins mailing list