Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685)
This documents the behavior that has always been the case since timeout
support was introduced in Python 3.3.
(cherry picked from commit b05dd79)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
  • Loading branch information
gpshead authored and miss-islington committed Sep 30, 2022
commit 39e2304136f22acf71694891a8b26df9a67f046b
9 changes: 7 additions & 2 deletions Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ underlying :class:`Popen` interface can be used directly.
.. attribute:: output

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

.. attribute:: stdout

Expand All @@ -201,7 +204,9 @@ underlying :class:`Popen` interface can be used directly.
.. attribute:: stderr

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

.. versionadded:: 3.3

Expand Down