Skip to content
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

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

zaneb
Copy link
Contributor

@zaneb zaneb commented Sep 25, 2020

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

@zaneb
Copy link
Contributor Author

zaneb commented Sep 25, 2020

This is just a docs change so I believe it should be given the "skip news" label.

Copy link
Contributor

@taleinat taleinat left a 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.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@taleinat taleinat added the docs Documentation in the Doc dir label Sep 26, 2020
@zaneb zaneb force-pushed the select-poll-timeout-docstrings branch from d54b73e to c4942e2 Compare October 1, 2020 03:21
@zaneb
Copy link
Contributor Author

zaneb commented Oct 1, 2020

Thanks for the suggestion. I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@taleinat: please review the changes made to this pull request.

@zaneb zaneb force-pushed the select-poll-timeout-docstrings branch from c4942e2 to 891cd82 Compare October 13, 2020 17:02
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
@zaneb zaneb force-pushed the select-poll-timeout-docstrings branch from 891cd82 to 6f86628 Compare November 24, 2020 22:06
Copy link
Contributor

@taleinat taleinat left a 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>
@taleinat taleinat force-pushed the select-poll-timeout-docstrings branch from b48cc99 to adff1f0 Compare January 20, 2022 22:36
@taleinat taleinat merged commit 27df756 into python:main Jan 20, 2022
@miss-islington
Copy link
Contributor

Thanks @zaneb for the PR, and @taleinat for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @zaneb and @taleinat, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 27df7566bc19699b967e0e30d7808637b90141f6 3.10

@miss-islington
Copy link
Contributor

Sorry @zaneb and @taleinat, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 27df7566bc19699b967e0e30d7808637b90141f6 3.9

taleinat pushed a commit to taleinat/cpython that referenced this pull request Jan 21, 2022
… select.depoll() doc-strings (pythonGH-22406).

(cherry picked from commit 27df756)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
taleinat pushed a commit to taleinat/cpython that referenced this pull request Jan 21, 2022
…select.depoll() doc-strings (pythonGH-22406).

(cherry picked from commit 27df756)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 21, 2022
@bedevere-bot
Copy link

GH-30741 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 21, 2022
@bedevere-bot
Copy link

GH-30742 is a backport of this pull request to the 3.9 branch.

taleinat added a commit that referenced this pull request Jan 21, 2022
… select.depoll() doc-strings (GH-22406)

(cherry picked from commit 27df756)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
taleinat added a commit that referenced this pull request Jan 21, 2022
…select.depoll() doc-strings (GH-22406)

(cherry picked from commit 27df756)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…select.depoll() doc-strings (pythonGH-22406)

(cherry picked from commit 27df756)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants