]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39791 native hooks for importlib.resources.files (GH-20576)
authorJason R. Coombs <jaraco@jaraco.com>
Mon, 8 Jun 2020 01:00:51 +0000 (21:00 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Jun 2020 01:00:51 +0000 (21:00 -0400)
commit843c27765652e2322011fb3e5d88f4837de38c06
tree84c801b6d0c7026c4623389daf390faa310182c5
parent972ab0327675e695373fc6272d5ac24e187579ad
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>
Lib/importlib/_bootstrap_external.py
Lib/importlib/_common.py
Lib/importlib/abc.py
Lib/importlib/readers.py [new file with mode: 0644]
Lib/importlib/resources.py
Lib/zipimport.py
Misc/NEWS.d/next/Library/2020-06-02-02-16-02.bpo-39791.StCJlA.rst [new file with mode: 0644]
Python/importlib_external.h
Python/importlib_zipimport.h