> On 29 Jun 2019, at 15:08, Tom Hale <t...@hale.ee> wrote: > > 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.
I think you need to use the dirfd version of all file operations to make sure that a symlink in the dir path is not changed why you are doing the multiple file operations. For example in shutil.py:1391 needs to create the tempfile using a dirfd. At shutil.py:1398 can't use use finally: for the cleanup? Barry > > 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. > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/5YC546OOZVP23V4F4EHXTL5OVI4VGXFZ/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/XVVJ4QOZHYCAHHCZ3FVRASG7M6ODYJMV/ Code of Conduct: http://python.org/psf/codeofconduct/