diff options
author | Gregory P. Smith <greg@krypto.org> | 2022-09-30 17:45:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 17:45:47 (GMT) |
commit | b05dd796492160c37c9e15e3882f699f411b3461 (patch) | |
tree | a177ef1f97c8ab6ecbbec6d0a44b4bbfe12a6734 | |
parent | 1cc308d03c1b44a0885a3c5f07d0786b49ea711d (diff) | |
download | cpython-b05dd796492160c37c9e15e3882f699f411b3461.zip cpython-b05dd796492160c37c9e15e3882f699f411b3461.tar.gz cpython-b05dd796492160c37c9e15e3882f699f411b3461.tar.bz2 |
gh-87597: Document TimeoutExpired.stdout & .stderr types (#97685)
This documents the behavior that has always been the case since timeout
support was introduced in Python 3.3.
-rw-r--r-- | Doc/library/subprocess.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 43d6ffc..dee5bd8 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -193,7 +193,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 @@ -202,7 +205,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 |