[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-12-24 Thread miss-islington
miss-islington added the comment: New changeset 7acfe4125725e86c982300cf10c0ab791a0783f4 by Miss Islington (bot) in branch '3.9': bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467) https://github.com/python/cpython/commit/7acfe4125725e86c982300cf10c0ab791a0783f4

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-12-24 Thread miss-islington
miss-islington added the comment: New changeset d5aadb28545fd15cd3517b604a8c7a520abd09c6 by Miss Islington (bot) in branch '3.8': bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467) https://github.com/python/cpython/commit/d5aadb28545fd15cd3517b604a8c7a520abd09c6

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-12-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Meta issue behind this one: The input= behavior on check_output is yet another unfortunate wart in the subprocess collection of APIs. PR to the main branch is in, 3.9 and 3.8 will automerge after CI runs. -- resolution: -> fixed stage: patch

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-12-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +22785 pull_request: https://github.com/python/cpython/pull/23935 ___ Python tracker ___

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-12-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22784 pull_request: https://github.com/python/cpython/pull/23934 ___ Python tracker

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-12-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 64abf373444944a240274a9b6d66d1cb01ecfcdd by Gregory P. Smith in branch 'master': bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467) https://github.com/python/cpython/commit/64abf373444944a240274a9b6d66d1cb01ecfcdd

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: It was a mere oversight that this didn't handle text= the same as universal_newlines=. I made a PR to keep their behavior consistent and match the documentation. -- ___ Python tracker

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +22357 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23467 ___ Python tracker

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > (probably can't even limit that to the case when `text` is used, since it was > added in 3.7) Well, actually, we can, since we probably don't need to preserve compatibility with the AttributeError currently caused by `text=True` with `input=None`.

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-22 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: It seems that allowing `input=None` to mean "redirect stdin to a pipe and send an empty string there" in `subprocess.check_output` was an accident(?), and this behavior is inconsistent with `subprocess.run` and `communicate`, where `input=None` has the same

[issue42388] subprocess.check_output(['echo', 'test'], text=True, input=None) fails

2020-11-17 Thread ThiefMaster
New submission from ThiefMaster : `subprocess.check_output(['echo', 'test'], text=True, input=None)` fails with `AttributeError: 'bytes' object has no attribute 'encode'` due to the function only checking for `universal_newlines` but not `text`: