gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (GH-124018)
(cherry picked from commit b543b32eff)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054)
Apply changes from importlib_resources 6.3.2.
(cherry picked from commit 8d63c8d47b)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
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.