Skip to content

[3.11] gh-157579: Fix race condition in the cleanup of tempfile.TemporaryDirectory (GH-157580) (GH-159074) - #161944

Draft
encukou wants to merge 2 commits into
python:3.11from
encukou:backport-c39b52d-plus-3.11
Draft

encukou wants to merge 2 commits into
python:3.11from
encukou:backport-c39b52d-plus-3.11

Conversation

@encukou

@encukou encukou commented Nov 13, 2026

Copy link
Copy Markdown
Member

This is more tricky than a regular backport; I want to run it through buildbots.


(cherry picked from commit 5c20517)

  • Add root user checks to test.support

This partially backports commit 86b8617 (GH-146195); making existing tests use the helper is omitted.

(cherry picked from commit e004cf8)

(all cherry picked from 3.12 commit c39b52d)

…e.TemporaryDirectory` (pythonGH-157580) (pythonGH-159074)

* pythongh-157579: Fix race condition in the cleanup of `tempfile.TemporaryDirectory` (pythonGH-157580)

(cherry picked from commit 5c20517)

* Add root user checks to test.support

This partially backports commit 86b8617
(pythonGH-146195); making existing tests use the helper is omitted.

* pythongh-134993: Add os.lstat() to os.supports_dir_fd (python#135188)

(cherry picked from commit e004cf8)

(all cherry picked from 3.12 commit c39b52d)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant