diff options
author | Desmond Cheong <desmondcheongzx@gmail.com> | 2021-03-08 20:06:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 20:06:02 (GMT) |
commit | 3abf6f010243a91bf57cbf357dac33193f7b8407 (patch) | |
tree | 10955a6bfecc49ee2bd5ca93efe33c887fd10ded /Misc | |
parent | bbba28212ce0f58096a4043f32442c6e727b74fc (diff) | |
download | cpython-3abf6f010243a91bf57cbf357dac33193f7b8407.zip cpython-3abf6f010243a91bf57cbf357dac33193f7b8407.tar.gz cpython-3abf6f010243a91bf57cbf357dac33193f7b8407.tar.bz2 |
bpo-14678: Update zipimport to support importlib.invalidate_caches() (GH-24159)
Added an invalidate_caches() method to the zipimport.zipimporter class based on the implementation of importlib.FileFinder.invalidate_caches(). This was done by adding a get_files() method and an _archive_mtime attribute to zipimport.zipimporter to check for updates or cache invalidation whenever the cache of files and toc entry information in the zipimporter is accessed.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-01-07-21-25-49.bpo-14678.1zniCH.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-01-07-21-25-49.bpo-14678.1zniCH.rst b/Misc/NEWS.d/next/Library/2021-01-07-21-25-49.bpo-14678.1zniCH.rst new file mode 100644 index 0000000..127650c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-07-21-25-49.bpo-14678.1zniCH.rst @@ -0,0 +1,3 @@ +Add an invalidate_caches() method to the zipimport.zipimporter class to +support importlib.invalidate_caches(). +Patch by Desmond Cheong. |