You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tempfile.TemporaryDirectory cleanup fails on DragonFly BSD for files with UF_NOUNLINK #154307
On DragonFly BSD, TemporaryDirectory.cleanup() fails to remove a directory containing files or directories with the UF_NOUNLINK flag set (as exercised by test.test_tempfile...test_cleanup_with_symlink_flags).
Unlike FreeBSD, DragonFly's unlink() on a UF_NOUNLINK file fails with EISDIR (IsADirectoryError) instead of EPERM. The cleanup's onexc handler only resets flags for PermissionError, so the IsADirectoryError propagates and the flags are never cleared:
IsADirectoryError: [Errno 21] Is a directory: '.../test0.txt'
Handling IsADirectoryError the same way as PermissionError fixes it. Related: gh-91133.
Activity
gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH-154309)
[3.13] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH…
[3.14] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH…
[3.15] gh-154307: Fix TemporaryDirectory cleanup on DragonFly BSD (GH…