bpo-45183: don't raise an exception when calling zipimport.zipimporter.find_spec() when the zip file is missing and the internal cache has been reset #28435
Conversation
…) when a zip file is missing and the internal cache has been reset
|
Thanks @brettcannon for the PR |
|
GH-28437 is a backport of this pull request to the 3.10 branch. |
…r.find_spec() when the zip file is missing and the internal cache has been reset (pythonGH-28435) This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path). (cherry picked from commit 209b7035f714dcc41df054b0b023e0b955d7e1a2) Co-authored-by: Brett Cannon <brett@python.org>
…importer.find_spec() when the zip file is missing and the internal cache has been reset (pythonGH-28435) This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path). (cherry picked from commit 209b703) Co-authored-by: Brett Cannon <brett@python.org>
…importer.find_spec() when the zip file is missing and the internal cache has been reset (GH-28435) (#28438) This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path). (cherry picked from commit 209b703) Co-authored-by: Brett Cannon <brett@python.org>

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path).
https://bugs.python.org/issue45183
Automerge-Triggered-By: GH:brettcannon
The text was updated successfully, but these errors were encountered: