diff options
author | Guido van Rossum <guido@python.org> | 2023-05-17 23:45:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 23:45:11 (GMT) |
commit | 7fc8e2d4627cdba5cb0075c9052ed6f4b6ecd36d (patch) | |
tree | f67ed5c5d2e2dd07fcc9f9fc130686232a48fa5d /Lib/asyncio | |
parent | b27fe67f3c643e174c3619b669228ef34b6d87ee (diff) | |
download | cpython-7fc8e2d4627cdba5cb0075c9052ed6f4b6ecd36d.zip cpython-7fc8e2d4627cdba5cb0075c9052ed6f4b6ecd36d.tar.gz cpython-7fc8e2d4627cdba5cb0075c9052ed6f4b6ecd36d.tar.bz2 |
gh-104340: Suppress warning about unawaited exception for closed pipe stdin (#104586)
Diffstat (limited to 'Lib/asyncio')
-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 50727ca..c4e5ba2 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 |