]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45183: don't raise an exception when calling zipimport.zipimporter.find_spec...
authorBrett Cannon <brett@python.org>
Fri, 17 Sep 2021 23:48:17 +0000 (16:48 -0700)
committerGitHub <noreply@github.com>
Fri, 17 Sep 2021 23:48:17 +0000 (16:48 -0700)
commit209b7035f714dcc41df054b0b023e0b955d7e1a2
tree41c4c89c7bb103a6858169c72ef79a559bb6260b
parentf4813388b4506b2fafb0089848c5b11cd503758c
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 (GH-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).
Lib/test/test_zipimport.py
Lib/zipimport.py
Misc/NEWS.d/next/Library/2021-09-17-15-58-53.bpo-45183.Vv_vch.rst [new file with mode: 0644]