[issue36656] Race conditions due to os.link and os.symlink POSIX specification

2019-06-03 Thread Tom Hale


Tom Hale  added the comment:

Serhiy wrote

> Detected problem is better than non-detected problem.

I agree. I also assert that no problem (via a shutil wrapper) is better than a 
detected problem which may not be handled.

While it's up to the programmer to handle exceptions, it's only systems 
programmers who will realise that there is a sometimes-occurring exception 
which should be handled.

So most people won't handle it. They don't know that they need to.

The shutil os.link and os.symlink wrappers under discussion on python-ideas 
prevent non-system-programmers from needing to know about the race-condition 
case (and correctly handling it).

If something is difficult to get right, then let's put it in shutil and save 
everyone reinventing the wheel.

3 specific cases in which an atomic link replacement would be useful are listed 
here:

https://code.activestate.com/lists/python-ideas/56195/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36656] Race conditions due to os.link and os.symlink POSIX specification

2019-06-03 Thread Tom Hale


Change by Tom Hale :


--
title: Allow os.symlink(src, target, force=True) to prevent race conditions -> 
Race conditions due to os.link and os.symlink POSIX specification

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com