[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread miss-islington


miss-islington  added the comment:


New changeset 822683238c36e15f59d289075917ff7dedb5f4e6 by Miss Islington (bot) 
in branch '3.7':
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
https://github.com/python/cpython/commit/822683238c36e15f59d289075917ff7dedb5f4e6


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset e883091abf7ca84a88e956fe5202e75c53bd4128 by Gregory P. Smith in 
branch 'master':
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
https://github.com/python/cpython/commit/e883091abf7ca84a88e956fe5202e75c53bd4128


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13239

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
components: +Documentation -Library (Lib)
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +13233
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Martin Panter

Martin Panter  added the comment:

Python 3.7 added the "capture_output" parameter, for Issue 32102. Before that 
change, you could use "subprocess.PIPE":

https://docs.python.org/3.6/library/subprocess.html#subprocess.run
“To [capture output], pass PIPE for the ‘stdout’ and/or ‘stderr’ arguments”

Since "capture_output" was added, it looks like you can still pass 
"subprocess.PIPE" on your own, but the documentation now only gives subtle 
hints that this might be supported. This was also brought up in Issue 33319.

--
nosy: +bbayles, martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Are you using something like below? This exception was added with 
ce0f33d04528fcafc673a8707871f8430d8f7ce8 (issue32102)

>>> subprocess.run('ls', stdout=subprocess.PIPE, capture_output=True)
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/subprocess.py", 
line 469, in run
raise ValueError('stdout and stderr arguments may not be used '
ValueError: stdout and stderr arguments may not be used with capture_output.

There is a note on the docs and a discussion on the issue that capture_output 
and stdout/stderr cannot be used at the same time.

https://docs.python.org/3/library/subprocess.html#subprocess.run

> If capture_output is true, stdout and stderr will be captured. When used, the 
> internal Popen object is automatically created with stdout=PIPE and 
> stderr=PIPE. The stdout and stderr arguments may not be supplied at the same 
> time as capture_output.

--
nosy: +gregory.p.smith, xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Joe Borg


New submission from Joe Borg :

Reading from 
https://docs.python.org/3/library/subprocess.html#subprocess.CompletedProcess

"""
If you ran the process with stderr=subprocess.STDOUT, stdout and stderr will be 
combined in this attribute, and stderr will be None.
"""

But, if you run `run()` with `capture_output=True`, you get the following 
exception:

"""
ValueError: stdout and stderr arguments may not be used with capture_output.
"""

So, it seems impossible to get the combined outputs of stdout and stderr with 
`run()`.

--
components: Library (Lib)
messages: 341158
nosy: Joe.Borg
priority: normal
severity: normal
status: open
title: subprocess.run fails with capture_output=True and stderr=STDOUT
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com