]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 25 Dec 2020 05:18:13 +0000 (21:18 -0800)
committerGitHub <noreply@github.com>
Fri, 25 Dec 2020 05:18:13 +0000 (21:18 -0800)
commitd5aadb28545fd15cd3517b604a8c7a520abd09c6
treec9ac8e4e3804418b013427092136d55df3c32470
parentefd64c8ea0fed1c13839cec0feea450820da34f8
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)

When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True.  This
reconciles the behavior to be consistent and adds a test to guarantee it.

Also clarifies the existing check_output documentation.

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
(cherry picked from commit 64abf373444944a240274a9b6d66d1cb01ecfcdd)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Doc/library/subprocess.rst
Lib/subprocess.py
Lib/test/test_subprocess.py
Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst [new file with mode: 0644]