diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-05-18 00:09:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 00:09:12 (GMT) |
commit | a8fc8b7e81e1e830771758a00312b7cea2803085 (patch) | |
tree | dc863514b95018c8d69760060e25625fab846546 /Lib/asyncio/subprocess.py | |
parent | 610cc0ab1b760b2abaac92bd256b96191c46b941 (diff) | |
download | cpython-a8fc8b7e81e1e830771758a00312b7cea2803085.zip cpython-a8fc8b7e81e1e830771758a00312b7cea2803085.tar.gz cpython-a8fc8b7e81e1e830771758a00312b7cea2803085.tar.bz2 |
[3.11] gh-104340: Suppress warning about unawaited exception for closed pipe stdin (GH-104586) (#104594)
(cherry picked from commit 7fc8e2d4627cdba5cb0075c9052ed6f4b6ecd36d)
Co-authored-by: Guido van Rossum <guido@python.org>
Diffstat (limited to 'Lib/asyncio/subprocess.py')
-rw-r--r-- | Lib/asyncio/subprocess.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/subprocess.py b/Lib/asyncio/subprocess.py index cd10231..c380bbb 100644 --- a/Lib/asyncio/subprocess.py +++ b/Lib/asyncio/subprocess.py @@ -81,6 +81,9 @@ class SubprocessStreamProtocol(streams.FlowControlMixin, self._stdin_closed.set_result(None) else: self._stdin_closed.set_exception(exc) + # Since calling `wait_closed()` is not mandatory, + # we shouldn't log the traceback if this is not awaited. + self._stdin_closed._log_traceback = False return if fd == 1: reader = self.stdout |