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
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.
On DragonFly BSD,
TemporaryDirectory.cleanup()fails to remove a directory containing files or directories with theUF_NOUNLINKflag set (as exercised bytest.test_tempfile...test_cleanup_with_symlink_flags).Unlike FreeBSD, DragonFly's
unlink()on aUF_NOUNLINKfile fails withEISDIR(IsADirectoryError) instead ofEPERM. The cleanup'sonexchandler only resets flags forPermissionError, so theIsADirectoryErrorpropagates and the flags are never cleared:Handling
IsADirectoryErrorthe same way asPermissionErrorfixes it. Related: gh-91133.Linked PRs