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-87452 Making returncode unreliability explicit #92181

Merged
merged 19 commits into from
Apr 24, 2023

Conversation

zitterbewegung
Copy link
Contributor

@zitterbewegung zitterbewegung commented May 2, 2022

gh-87452: Making returncode unreliability explicit

We make explicit that the value stored in return code is best returned by poll instead of using the value in return code.

@bedevere-bot
Copy link

Every change to Python requires a NEWS entry.

Please, add it using the blurb_it Web app or the blurb command-line tool.

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels May 2, 2022
@zitterbewegung zitterbewegung changed the title Making returncode unreliability explicit gh-87452 Making returncode unreliability explicit May 2, 2022
@benjaminp
Copy link
Contributor

Thank you for the PR.

I don't think "out-of-date" is the right term here. Either the entire subprocess.Subprocess instance is aware of the exit of the child process and knows the return code, or it doesn't. The first paragraph of the method documentation could perhaps be rearranged to more clearly state the order of events instead of appending another sentence.

@benjaminp
Copy link
Contributor

I would propose:

The child return code. Initially ``None``, :attr:`returncode` is set by :meth:`poll` and :meth:`wait` after process termination is observed.
``

Doc/library/subprocess.rst Outdated Show resolved Hide resolved
Doc/library/subprocess.rst Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor

Please remove the duplicate NEWS entry.

Doc/library/subprocess.rst Outdated Show resolved Hide resolved
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Again, please remove the duplicate NEWS entry. Also please address Benjamin's remarks.

Doc/library/subprocess.rst Outdated Show resolved Hide resolved
@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.

@slateny
Copy link
Contributor

slateny commented Dec 6, 2022

@zitterbewegung Would you still be interested in giving the PR a quick update per the reviews above?

@zitterbewegung
Copy link
Contributor Author

Sorry I can do that.

Wrapping to 79 characters.
@netlify
Copy link

netlify bot commented Dec 6, 2022

Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit 41a5d22
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/638f5503b72cc30008de175b
😎 Deploy Preview https://deploy-preview-92181--python-cpython-preview.netlify.app/whatsnew/changelog
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor Author

@zitterbewegung zitterbewegung left a comment

Choose a reason for hiding this comment

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

  • Fixed word wrap issue
  • Removed duplicate news entry.

Copy link
Contributor Author

@zitterbewegung zitterbewegung left a comment

Choose a reason for hiding this comment

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

Removed trailing whitespace

@zitterbewegung
Copy link
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@erlend-aasland: please review the changes made to this pull request.

@zitterbewegung
Copy link
Contributor Author

@erlend-aasland can this be reviewed?

@gpshead gpshead self-assigned this Apr 24, 2023
@gpshead gpshead merged commit 68f5836 into python:main Apr 24, 2023
@miss-islington
Copy link
Contributor

Thanks @zitterbewegung for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@erlend-aasland
Copy link
Contributor

Sorry for the delay; thanks Greg for merging. Thanks for the PR, Joshua.

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 needs backport to 3.11 only security fixes skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants