summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/abc.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-06-08 01:00:51 (GMT)
committerGitHub <noreply@github.com>2020-06-08 01:00:51 (GMT)
commit843c27765652e2322011fb3e5d88f4837de38c06 (patch)
tree84c801b6d0c7026c4623389daf390faa310182c5 /Lib/importlib/abc.py
parent972ab0327675e695373fc6272d5ac24e187579ad (diff)
downloadcpython-843c27765652e2322011fb3e5d88f4837de38c06.zip
cpython-843c27765652e2322011fb3e5d88f4837de38c06.tar.gz
cpython-843c27765652e2322011fb3e5d88f4837de38c06.tar.bz2
bpo-39791 native hooks for importlib.resources.files (GH-20576)
* Provide native .files support on SourceFileLoader. * Add native importlib.resources.files() support to zipimporter. Remove fallback support. * make regen-all * 📜🤖 Added by blurb_it. * Move 'files' into the ResourceReader so it can carry the relevant module name context. * Create 'importlib.readers' module and add FileReader to it. * Add zip reader and rely on it for a TraversableResources object on zipimporter. * Remove TraversableAdapter, no longer needed. * Update blurb. * Replace backslashes with forward slashes. * Incorporate changes from importlib_metadata 2.0, finalizing the interface for extension via get_resource_reader. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diffstat (limited to 'Lib/importlib/abc.py')
-rw-r--r--Lib/importlib/abc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index b8a9bb1..0b20e7c 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -468,7 +468,7 @@ class TraversableResources(ResourceReader):
raise FileNotFoundError(resource)
def is_resource(self, path):
- return self.files().joinpath(path).isfile()
+ return self.files().joinpath(path).is_file()
def contents(self):
return (item.name for item in self.files().iterdir())