Bug report
It appears that subprocess.Popen does not accept a stdin stream of type SpooledTemporaryFile and just fails. I've gone ahead and created a public unit test showing this in action. It fails on all MacOS/Windows10/Ubuntu. However, switching from SpooledTemporaryFile to an actual named file or a tempfile.TemporaryFile works just fine.
See bug repro case here:
https://github.com/zackees/python-subprocess-bug-spooled-temp-file
I'm not sure if this is a bug or intended behavior. Feel free to close if this is intended behavior.
Your environment
The test for SpooledTemporaryFile fails on Windows10, MacOS and Ubuntu using python 3.11
Bug report
It appears that
subprocess.Popendoes not accept a stdin stream of typeSpooledTemporaryFileand just fails. I've gone ahead and created a public unit test showing this in action. It fails on all MacOS/Windows10/Ubuntu. However, switching fromSpooledTemporaryFileto an actual named file or atempfile.TemporaryFileworks just fine.See bug repro case here:
https://github.com/zackees/python-subprocess-bug-spooled-temp-file
I'm not sure if this is a bug or intended behavior. Feel free to close if this is intended behavior.
Your environment
The test for SpooledTemporaryFile fails on Windows10, MacOS and Ubuntu using python 3.11