]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Jul 2026 22:46:59 +0000 (01:46 +0300)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 22:46:59 +0000 (22:46 +0000)
commit1c1088b1da5a7484b7b04e90ccc47aa362e709eb
treee817a9b9993d3fac93af55a2047277e80cf6d908
parent1034e07b7d55642c3a46252e6b0a631c2df588d2
gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)

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.

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]