Broken out from bug 8232 (see bug 8232 comment #59 for some more context). Our subprocess module behaves differently from the one in Python's standard library. Currently, we always assume that the caller of subprocess_run() cares about stdin, stderr, and stdout. In the stdlib [1], you have to be explicit if you want to send data to the process' stdin, and if you care about stdout/stderr. It would be nice if we could change our module to behave in the same way as the stdlib. One side effect of our subprocess_run() is that we get ResourceWarnings if we fail to open the process we want to run. This is due to a bug in asyncio, which was fixed in Python 3.8 [2]. Re-writing our module could make the ResourceWarning disappear from the example in bug 8232, comment #59. In that example, ignoring stdin would avoid the branch where the ResourceWarnings appear. [1] https://docs.python.org/3/library/subprocess.html#subprocess.run [2] https://github.com/python/cpython/issues/79902