Gregory P. Smith <g...@krypto.org> added the comment:

On POSIX systems, keeping the file open means you will keep a handle to the 
original file in the case where something moves a new file into it's place (as 
is normal during software package updates) or otherwise unlinks the original.  
That is the situation that led to filing this issue and is one that is 
technically solvable by keeping the file handle open and always using that for 
access.

We can't do anything very meaningful about someone opening the existing file in 
'w+a' mode and scribbling other bytes over it.  I wouldn't try to protect 
against that.  "locking" a file isn't an option on most platforms and when 
available, is very unusual to do in this century.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue19081>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to