[New-bugs-announce] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?)

Josh Rosenberg report at bugs.python.org
Tue Oct 14 23:09:18 CEST 2014


New submission from Josh Rosenberg:

(U) The examples for the function still show the return code in the form os.popen would produce (a program exiting with status 1 would return 256 as the status), but the new code from #10197 makes the status 1, not 256.

(U) This is a breaking change for code relying on what was already a legacy interface. Either the docs should call out the change, or the code needs to restore the previous behavior.

(U) Ultra simple repro:

>>> subprocess.getstatusoutput('python -c "exit(1)"')
Expected:
(256, '')
Actual:
(1, '')

----------
messages: 229354
nosy: josh.rosenberg
priority: normal
severity: normal
status: open
title: subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?)
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22635>
_______________________________________


More information about the New-bugs-announce mailing list