-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-41857: Document timeout arguments in select module #22406
Conversation
This is just a docs change so I believe it should be given the "skip news" label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zaneb, this would certainly be an improvement!
A small request: I suggest more closely imitating the wording used by select.kqueue.control()
:
timeout as otimeout: object = None
The maximum time to wait in seconds, or else None to wait forever.
This accepts floats for smaller timeouts, too.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
d54b73e
to
c4942e2
Compare
Thanks for the suggestion. I have made the requested changes; please review again. |
Thanks for making the requested changes! @taleinat: please review the changes made to this pull request. |
c4942e2
to
891cd82
Compare
The docstring for the poll() methods of the select.poll[1] and select.devpoll[2] classes did not describe the expected units of the timeout argument (milliseconds). Previously this information was only available from the online documentation. This is a potential source of confusion, because other poll() methods in the select module, such as select.epoll and select.kqueue objects, use units of seconds (and were documented). Include the units in the docstring description so that this information is at least available from interactive help. [1] https://docs.python.org/3/library/select.html#select.poll.poll [2] https://docs.python.org/3/library/select.html#select.devpoll.poll
891cd82
to
6f86628
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
b48cc99
to
adff1f0
Compare
Sorry, @zaneb and @taleinat, I could not cleanly backport this to |
Sorry @zaneb and @taleinat, I had trouble checking out the |
… select.depoll() doc-strings (pythonGH-22406). (cherry picked from commit 27df756) Co-authored-by: Zane Bitter <zbitter@redhat.com>
…select.depoll() doc-strings (pythonGH-22406). (cherry picked from commit 27df756) Co-authored-by: Zane Bitter <zbitter@redhat.com>
GH-30741 is a backport of this pull request to the 3.10 branch. |
GH-30742 is a backport of this pull request to the 3.9 branch. |
…select.depoll() doc-strings (pythonGH-22406) (cherry picked from commit 27df756) Co-authored-by: Zane Bitter <zbitter@redhat.com>
The docstring for the poll() methods of the select.poll and
select.devpoll classes did not describe the expected units of the
timeout argument (milliseconds). Previously this information was only
available from the online documentation.
This is a potential source of confusion, because other poll() methods in
the select module, such as epoll and kqueue Polling objects, use units
of seconds (and were documented).
Include the units in the docstring description so that this information
is at least available from interactive help.
https://bugs.python.org/issue41857