diff options
author | Brett Cannon <brett@python.org> | 2021-09-18 00:46:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 00:46:22 (GMT) |
commit | e1bdecb6dc7ac33256d5fa875d45634512d2a90e (patch) | |
tree | 16ee13faa6339c9acd6846ccfeaacdc4d979189b /Python | |
parent | 397dad4001cd402cf4843ab44963932ea81c2e73 (diff) | |
download | cpython-e1bdecb6dc7ac33256d5fa875d45634512d2a90e.zip cpython-e1bdecb6dc7ac33256d5fa875d45634512d2a90e.tar.gz cpython-e1bdecb6dc7ac33256d5fa875d45634512d2a90e.tar.bz2 |
[3.10] 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) (#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 209b7035f714dcc41df054b0b023e0b955d7e1a2)
Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/importlib_zipimport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/importlib_zipimport.h b/Python/importlib_zipimport.h index af01711..bb870c3 100644 --- a/Python/importlib_zipimport.h +++ b/Python/importlib_zipimport.h @@ -548,7 +548,7 @@ const unsigned char _Py_M__zipimport[] = { 0,106,1,131,1,124,0,95,2,124,0,106,2,116,3,124, 0,106,1,60,0,87,0,100,1,83,0,4,0,116,4,121, 35,1,0,1,0,1,0,116,3,160,5,124,0,106,1,100, - 1,161,2,1,0,100,1,124,0,95,2,89,0,100,1,83, + 1,161,2,1,0,105,0,124,0,95,2,89,0,100,1,83, 0,119,0,41,2,122,41,82,101,108,111,97,100,32,116,104, 101,32,102,105,108,101,32,100,97,116,97,32,111,102,32,116, 104,101,32,97,114,99,104,105,118,101,32,112,97,116,104,46, |