]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-154308: Clear file flags in os_helper.rmtree() (GH-154310) (GH-154314)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 21 Jul 2026 07:48:31 +0000 (09:48 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Jul 2026 07:48:31 +0000 (07:48 +0000)
commit0f497458d76e03fdd408ba476f82c30699f67cc9
tree8d554914718ae075cc2bc0eceff894d22a726aef
parent0fd12095b3174bb3e622f07604fe0e9a57509863
[3.15] gh-154308: Clear file flags in os_helper.rmtree() (GH-154310) (GH-154314)

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.
(cherry picked from commit 1f649fecb645d70b9c48268839e4177d8fe4e1d1)

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