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

gh-128342: Specify timeout unit in subprocess docstrings #128343

Merged
merged 3 commits into from
Dec 30, 2024
Merged

Conversation

n-l-i
Copy link
Contributor

@n-l-i n-l-i commented Dec 30, 2024

@n-l-i n-l-i requested a review from gpshead as a code owner December 30, 2024 10:12
Copy link

cpython-cla-bot bot commented Dec 30, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Dec 30, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@srinivasreddy
Copy link
Contributor

isn't the implicit assumption for timeout is seconds?

@n-l-i
Copy link
Contributor Author

n-l-i commented Dec 30, 2024

It is not uncommon for timeout to be specified in milliseconds in other frameworks and programming languages. I am not aware of whether seconds is the norm unless otherwise specified in the cpython standard libraries, and I haven't used these libraries exclusively enough to have been able to form that impression on my own. That's why I thought it was better to make it clear like has already been done in some other modules here.

Lib/subprocess.py Outdated Show resolved Hide resolved
Lib/subprocess.py Outdated Show resolved Hide resolved
@bedevere-app
Copy link

bedevere-app bot commented Dec 30, 2024

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.

@terryjreedy
Copy link
Member

I would merge this with the simpler edits that leave a smoother flow of thought. Agree with skipping news.

@terryjreedy terryjreedy added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Dec 30, 2024
gpshead and others added 2 commits December 30, 2024 12:27
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in python, yes, floating point seconds is the common thing. but API design wise it is always best to explicitly document that. (given a time machine i'd have even put the units in the parameter name)

@gpshead gpshead self-assigned this Dec 30, 2024
@gpshead gpshead enabled auto-merge (squash) December 30, 2024 20:31
@gpshead gpshead merged commit dafe7a4 into python:main Dec 30, 2024
39 of 40 checks passed
@miss-islington-app
Copy link

Thanks @n-l-i for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 30, 2024
…nGH-128343)

Specify timeout unit (seconds) in subprocess docstrings
(cherry picked from commit dafe7a4)

Co-authored-by: n-l-i <57808975+n-l-i@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

bedevere-app bot commented Dec 30, 2024

GH-128365 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 30, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 30, 2024
…nGH-128343)

Specify timeout unit (seconds) in subprocess docstrings
(cherry picked from commit dafe7a4)

Co-authored-by: n-l-i <57808975+n-l-i@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

bedevere-app bot commented Dec 30, 2024

GH-128366 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 30, 2024
gpshead pushed a commit that referenced this pull request Dec 30, 2024
…28343) (#128366)

gh-128342: Specify timeout unit in subprocess docstrings (GH-128343)

Specify timeout unit (seconds) in subprocess docstrings
(cherry picked from commit dafe7a4)

Co-authored-by: n-l-i <57808975+n-l-i@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gpshead pushed a commit that referenced this pull request Dec 30, 2024
…28343) (#128365)

gh-128342: Specify timeout unit in subprocess docstrings (GH-128343)

Specify timeout unit (seconds) in subprocess docstrings
(cherry picked from commit dafe7a4)

Co-authored-by: n-l-i <57808975+n-l-i@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants