bpo-34170: Fix pymain_run_file() by vstinner · Pull Request #8660 · python/cpython (original) (raw)
@matrixise I am afraid that nothing on earth is faster than @vstinner, not even unladen swallows!
More seriously, I knew that I modifed PyRun_AnyFileExFlags() to change when the file is closed. But the full test passed on Linux. It seems like it only failed on specific platforms. Strange. It might be related to os.urandom() private FD, I don't know.
I also noticed that test_subprocess failed on VSTS: macOS, before I merged my PR (the one which introduced the fix), but I don't trust VSTS since this CI has many random failures.
Note: FYI I wrote this fix in my car. But no, I wasn't driving hopefully ;-) I'm now in holiday, see you back in a few weeks!