◐ Shell
clean mode source ↗

gh-87452 Making returncode unreliability explicit by zitterbewegung · Pull Request #92181 · python/cpython

@zitterbewegung

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

gh-87452: Making returncode unreliability explicit

@bedevere-bot

@zitterbewegung zitterbewegung changed the title Making returncode unreliability explicit gh-87452 Making returncode unreliability explicit

May 2, 2022

@benjaminp

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

I would propose:

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

benjaminp

@erlend-aasland

Please remove the duplicate NEWS entry.

slateny

arhadthedev

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>

erlend-aasland

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.

@bedevere-bot

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

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

@zitterbewegung

Wrapping to 79 characters.

@netlify

zitterbewegung

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.

zitterbewegung

Choose a reason for hiding this comment

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

Removed trailing whitespace

@zitterbewegung

I have made the requested changes; please review again.

@bedevere-bot

Thanks for making the requested changes!

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

furkanonder

@zitterbewegung

@miss-islington

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

@erlend-aasland

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