mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-104340: Suppress warning about unawaited exception for closed pipe stdin (GH-104586) (#104594)
(cherry picked from commit 7fc8e2d462
)
Co-authored-by: Guido van Rossum <guido@python.org>
This commit is contained in:
parent
610cc0ab1b
commit
a8fc8b7e81
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue