]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 21 Jul 2026 03:54:11 +0000 (05:54 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2026 03:54:11 +0000 (06:54 +0300)
commitb8d315182c54cc2b2fc96d570a648bad0ead0549
tree92c6ccffc5401faa4668c9b56ea78f8a6422adc8
parent177033f163b69826f04fb814e399d1aaeaf6d99f
[3.13] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309) (GH-154313)

On DragonFly BSD, removing a file or directory with the UF_NOUNLINK flag
fails with EISDIR (IsADirectoryError) instead of EPERM, so the cleanup did
not reset the flags.  Handle IsADirectoryError the same as PermissionError.
(cherry picked from commit 1c1088b1da5a7484b7b04e90ccc47aa362e709eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/tempfile.py
Misc/NEWS.d/next/Library/2026-07-21-01-13-39.gh-issue-154307.UNFKL4.rst [new file with mode: 0644]