Skip to content

[3.15] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)#154311

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-1c1088b-3.15
Jul 21, 2026
Merged

[3.15] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)#154311
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-1c1088b-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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 1c1088b)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

…honGH-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.
(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>
@serhiy-storchaka
serhiy-storchaka merged commit b7e0855 into python:3.15 Jul 21, 2026
55 checks passed
@miss-islington
miss-islington deleted the backport-1c1088b-3.15 branch July 21, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants