Skip to content

Commit

Permalink
[3.9] gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685
Browse files Browse the repository at this point in the history
) (GH-97688)

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
miss-islington and gpshead authored Oct 4, 2022
1 parent 71eddde commit 94dbdbb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
.. 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 @@ -204,7 +207,9 @@ compatibility with older versions, see the :ref:`call-function-trio` section.
.. 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

0 comments on commit 94dbdbb

Please sign in to comment.