[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

Armin Rigo report at bugs.python.org
Wed Jun 5 15:45:34 CEST 2013


Armin Rigo added the comment:

Brett: I don't really have a constructive opinion on this matter.  I could suggest putting a bit more logic in py_compile.compile(cfile=...) to revert to the old behavior if we specify an already-existing target, in order to fix the other reported issue that custom permissions set on the target file are lost.  But I would understand if you decide that this is not compatible with the gains of atomic file creations.  I only have a problem with replacing block devices with regular files.  I don't have a particular opinion if the target file is a symlink (as long, of course, as it doesn't lead to whatever it points to being replaced, but it shouldn't).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17222>
_______________________________________


More information about the Python-bugs-list mailing list