[issue42738] subprocess: don't close all file descriptors by default (close_fds=False)

2021-10-26 Thread Richard Xia
Richard Xia added the comment: I'd like to provide another, non-performance-related use case for changing the default value of Popen's close_fds parameters back to False. In some scenarios, a (non-Python) parent process may want its descendant processes to inherit a parti

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-03-27 Thread Richard Xia
Richard Xia added the comment: Thanks for the discussion. I ended up doing something similar to the code snippet Christian posted, except I also had a second try/except FileNotFoundError within the original finally block to catch the case that David pointed out. In retrospect, I probably

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-02-15 Thread Richard Xia
New submission from Richard Xia: Here is a very short program to demonstrate what I'm seeing: >>> import tempfile >>> import os >>> with tempfile.NamedTemporaryFile(delete=True) as fp: ... print(fp.name) ... os.system('rm {}'.format(fp.name))