Skip to content

[3.15] gh-154308: Clear file flags in os_helper.rmtree() (GH-154310)#154314

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

[3.15] gh-154308: Clear file flags in os_helper.rmtree() (GH-154310)#154314
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-1f649fe-3.15

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

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

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

)

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 21, 2026 03:52
@serhiy-storchaka
serhiy-storchaka merged commit 0f49745 into python:3.15 Jul 21, 2026
134 of 138 checks passed
@miss-islington
miss-islington deleted the backport-1f649fe-3.15 branch July 21, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants