[issue17634] Win32: shutil.copy leaks file handles to child processes

2014-07-30 Thread STINNER Victor
STINNER Victor added the comment: The issue has been fixed in Python 3.4 with the PEP 446. I close this issue. If you would like to enhance shutil.copyfile() by using CopyFile() on Windows, please open a new issue. -- resolution: -> fixed status: open -> closed versions: -Python 2.7,

[issue17634] Win32: shutil.copy leaks file handles to child processes

2014-07-30 Thread Mark Lawrence
Mark Lawrence added the comment: PEP 446 supersedes PEP 433. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ __

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-05 Thread STINNER Victor
STINNER Victor added the comment: See also the PEP 433 which proposes to disable file descriptor inherance by default. 2013/4/5 Richard Oudkerk : > > Richard Oudkerk added the comment: > > This problem also affects processes started by multiprocessing (although it > is fixed in http://hg.python

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: This problem also affects processes started by multiprocessing (although it is fixed in http://hg.python.org/sandbox/sbt#spawn). As far as I am concerned O_NOINHERIT should really have been applied by default in Python 3. You only get inheritable fds on Wind

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-04 Thread R. David Murray
R. David Murray added the comment: Unless I'm misunderstanding something, this has already been fixed in python3, where subprocess closes any open files (other than stdin/stdout/stderr) by default. In Python2.7 (and possibly earlier, I haven't checked) you can get the same effect by specifyin

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, hynek, sbt, tarek versions: +Python 3.4 -Python 2.6, Python 3.1, Python 3.2 ___ Python tracker ___ __

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-04 Thread Andrej Krpic
New submission from Andrej Krpic: Function shutil.copy opens source file with open('rb') and destination file with open('wb') and then proceeds to copy the content. If you create child process from the same python process during that time, that process will inherit open file handles. This cou