Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcdc01ea

Browse files
gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685)
This documents the behavior that has always been the case since timeoutsupport was introduced in Python 3.3.(cherry picked from commitb05dd79)Co-authored-by: Gregory P. Smith <greg@krypto.org>
1 parentab2f1a6 commitcdc01ea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎Doc/library/subprocess.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ underlying :class:`Popen` interface can be used directly.
193193
..attribute::output
194194

195195
Output of the child process if it was captured by:func:`run` or
196-
:func:`check_output`. Otherwise, ``None``.
196+
:func:`check_output`. Otherwise, ``None``. This is always
197+
:class:`bytes` when any output was captured regardless of the
198+
``text=True`` setting. It may remain ``None`` instead of ``b''``
199+
when no output was observed.
197200

198201
..attribute::stdout
199202

@@ -202,7 +205,9 @@ underlying :class:`Popen` interface can be used directly.
202205
..attribute::stderr
203206

204207
Stderr output of the child process if it was captured by:func:`run`.
205-
Otherwise, ``None``.
208+
Otherwise, ``None``. This is always:class:`bytes` when stderr output
209+
was captured regardless of the ``text=True`` setting. It may remain
210+
``None`` instead of ``b''`` when no stderr output was observed.
206211

207212
..versionadded::3.3
208213

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp