summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-04 16:59:07 (GMT)
committerGitHub <noreply@github.com>2022-10-04 16:59:07 (GMT)
commit94dbdbbd403950857913049c7445534d7ec86d39 (patch)
treee5325026074d517099ee125c9e246ad0f5f75b1a
parent71edddea86c53a91a56ebebdb18e9d616f4675c2 (diff)
downloadcpython-94dbdbbd403950857913049c7445534d7ec86d39.zip
cpython-94dbdbbd403950857913049c7445534d7ec86d39.tar.gz
cpython-94dbdbbd403950857913049c7445534d7ec86d39.tar.bz2
[3.9] gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685) (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 b05dd796492160c37c9e15e3882f699f411b3461) Co-authored-by: Gregory P. Smith <greg@krypto.org>
-rw-r--r--Doc/library/subprocess.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 45eff7f..10e40635 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -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
@@ -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