gh-154726: Fix shutil.copyfile() for symlinks to special files with follow_symlinks=False - #154728
Conversation
…llow_symlinks=False`
|
fifo / socket have the same problem, and I think they are already fixed by this PR. We should update the PR's title to mention this, like using 'special file' in the news entry. And maybe we can update the tests to test socket and fifo to ensure this and prevent future regressions. But it's up to you. |
shutil.copyfile() for device symlinks with follow_symlinks=Falseshutil.copyfile() for symlinks to special files with follow_symlinks=False
|
Hi @aisk, done. I just noticed that one test is not grouped with the others, but maybe it's too cosmetic to run the whole CI again for that. If any other change is needed, then I'll push that too. |
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit bf7e3d2 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154728%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
Sorry, @lkk7 and @encukou, I could not cleanly backport this to |
|
Sorry, @lkk7 and @encukou, I could not cleanly backport this to |
|
Oh, #142693 is only in 3.16. |
Fixes #154726.
follow_symlinks=False/dev/null.shutil.copyfile()rejects device symlinks withfollow_symlinks=False#154726