gh-93353: Fix importlib.resources._tempfile() finalizer by vstinner · Pull Request #93377 · python/cpython

Conversation

vstinner

serhiy-storchaka

@vstinner vstinner marked this pull request as ready for review

Jun 13, 2022
Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.

@vstinner vstinner deleted the resources_finalizer branch

Jun 13, 2022

miss-islington pushed a commit to miss-islington/cpython that referenced this issue

Jun 13, 2022
…GH-93377)

Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.
(cherry picked from commit 443ca73)

Co-authored-by: Victor Stinner <vstinner@python.org>

miss-islington pushed a commit to miss-islington/cpython that referenced this issue

Jun 13, 2022
…GH-93377)

Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.
(cherry picked from commit 443ca73)

Co-authored-by: Victor Stinner <vstinner@python.org>

miss-islington added a commit that referenced this issue

Jun 13, 2022
Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.
(cherry picked from commit 443ca73)

Co-authored-by: Victor Stinner <vstinner@python.org>

miss-islington added a commit that referenced this issue

Jun 13, 2022
Fix the importlib.resources.as_file() context manager to remove the
temporary file if destroyed late during Python finalization: keep a
local reference to the os.remove() function. Patch by Victor Stinner.
(cherry picked from commit 443ca73)

Co-authored-by: Victor Stinner <vstinner@python.org>