You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[doc] Clarify that Popen.returncode does not get auto-set when the process terminates #87452
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2021-02-21.15:56:24.983>labels= ['easy', '3.9', '3.10', '3.11', 'library', 'docs']
title='[doc] Clarify that Popen.returncode does not get auto-set when the process terminates'updated_at=<Date2021-11-27.19:08:00.355>user='https://github.com/anntzer'
Currently, the documentation for Popen.returncode states
The child return code, set by poll() and wait() (and indirectly by communicate()). A None value indicates that the process hasn’t terminated yet.
A negative value -N indicates that the child was terminated by signal N (POSIX only).
As far back as https://bugs.python.org/issue1727024 it had been suggested that this fails to emphasize an important piece of information, namely that this attribute can be outdated (it is *only* set if poll() or wait() are called; this is not obvious, e.g. returncode could have beeen implemented as a property that auto-calls poll()). I do realize that a strict reading of the docs does suggest the actual behavior, but a bit of explicitness won't hurt...
The wording suggested in https://bugs.python.org/issue1727024 seems clearer to me ("Note: The value stored in returncode may be out-of-date. Use poll() to reliably find the current return code.").
changed the title [-]Clarify that Popen.returncode does not get auto-set when the process terminates[/-][+][doc] Clarify that Popen.returncode does not get auto-set when the process terminates[/+]on Nov 27, 2021
Activity
anntzer commentedon Feb 21, 2021
Currently, the documentation for Popen.returncode states
As far back as https://bugs.python.org/issue1727024 it had been suggested that this fails to emphasize an important piece of information, namely that this attribute can be outdated (it is *only* set if poll() or wait() are called; this is not obvious, e.g. returncode could have beeen implemented as a property that auto-calls poll()). I do realize that a strict reading of the docs does suggest the actual behavior, but a bit of explicitness won't hurt...
The wording suggested in https://bugs.python.org/issue1727024 seems clearer to me ("Note: The value stored in returncode may be out-of-date. Use poll() to reliably find the current return code.").
[-]Clarify that Popen.returncode does not get auto-set when the process terminates[/-][+][doc] Clarify that Popen.returncode does not get auto-set when the process terminates[/+]Merge remote-tracking branch 'refs/remotes/origin/pythongh-87452' into …
Merge branch 'python:main' into pythongh-87452
Merge branch 'python:main' into pythongh-87452
Merge branch 'python:main' into pythongh-87452
Merge branch 'main' into pythongh-87452
gh-87452: Improve the Popen.returncode docs
pythongh-87452: Improve the Popen.returncode docs
gpshead commentedon Apr 24, 2023
thanks, good clarification. merged.
Merge branch 'main' into superopt
Merge branch 'superopt' into superopt_spec
[3.11] gh-87452: Improve the Popen.returncode docs (#103771)