Skip to content

[3.9] bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)#23934

Merged
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-64abf37-3.9
Dec 25, 2020
Merged

[3.9] bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)#23934
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-64abf37-3.9

Conversation

@miss-islington

@miss-islington miss-islington commented Dec 25, 2020

Copy link
Copy Markdown
Contributor

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 64abf37)

Co-authored-by: Gregory P. Smith greg@krypto.org

https://bugs.python.org/issue42388

Automerge-Triggered-By: GH:gpshead

…honGH-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 64abf37)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@gpshead: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants