]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-154308: Clear file flags in os_helper.rmtree() (GH-154310)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Jul 2026 22:47:43 +0000 (01:47 +0300)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 22:47:43 +0000 (22:47 +0000)
commit1f649fecb645d70b9c48268839e4177d8fe4e1d1
tree40680cffb6d892ac401386f262b4c3f4a19f3f56
parent1c1088b1da5a7484b7b04e90ccc47aa362e709eb
gh-154308: Clear file flags in os_helper.rmtree() (GH-154310)

On BSD systems a test may leave behind files or directories with flags
such as UF_IMMUTABLE or UF_NOUNLINK set, which prevent the directory from
being modified or removed.  Clear the flags before removing, so cleaning
up a temporary directory does not fail.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/test/support/os_helper.py