summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_common.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-07-30 01:05:05 (GMT)
committerGitHub <noreply@github.com>2021-07-30 01:05:05 (GMT)
commitaaa83cdfab6817446285e631232f64b394ac6791 (patch)
treed41195f1412a533b1c7333b99adcc77f171329a1 /Lib/importlib/_common.py
parent851cca8c22795a2f143ad5ebc10adab3c7784ad0 (diff)
downloadcpython-aaa83cdfab6817446285e631232f64b394ac6791.zip
cpython-aaa83cdfab6817446285e631232f64b394ac6791.tar.gz
cpython-aaa83cdfab6817446285e631232f64b394ac6791.tar.bz2
bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436)
* bpo-44771: Apply changes from importlib_resources@3b24bd6307 * Add blurb * Exclude namespacedata01 from eol conversion.
Diffstat (limited to 'Lib/importlib/_common.py')
-rw-r--r--Lib/importlib/_common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_common.py b/Lib/importlib/_common.py
index 549fee3..74654b3 100644
--- a/Lib/importlib/_common.py
+++ b/Lib/importlib/_common.py
@@ -12,6 +12,7 @@ from .abc import ResourceReader, Traversable
from ._adapters import wrap_spec
Package = Union[types.ModuleType, str]
+Resource = Union[str, os.PathLike]
def files(package):
@@ -93,7 +94,7 @@ def _tempfile(reader, suffix=''):
finally:
try:
os.remove(raw_path)
- except FileNotFoundError:
+ except (FileNotFoundError, PermissionError):
pass