Based on the below positive feedback, I've created a PR here: https://github.com/python/cpython/pull/14464 Only shutil.symlink is currently implemented. Feedback (and possibly fixes) requested from Windows users. Thanks to all for their ideas, input and constructive criticism. Cheers, -- Tom Hale On 26/6/19 2:58 am, Serhiy Storchaka wrote:
04.06.19 10:25, Inada Naoki пише:
If "ln -sf" is not atomic and do remove & symlink, web server or php will return 404 error between remove and symlink.
I feel this use case is more real world application than "I don't want exception even when other process creates file at the same time".
Thank you, Inada-san, your example convinced me. Now I agree that it is worth to add shutil.symlink (and maybe shutil.link) which supports the "ln -sf" behavior.