]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-24792: Fix zipimporter masking the cause of import errors (GH-22204)
authorIrit Katriel <iritkatriel@yahoo.com>
Sat, 19 Dec 2020 00:09:54 +0000 (00:09 +0000)
committerGitHub <noreply@github.com>
Sat, 19 Dec 2020 00:09:54 +0000 (16:09 -0800)
commitfb34096140bbb74c81500dd8bbc3c69c1d24d9ab
tree0b3dd85011b4d6f36068f0e69f38666178a10b48
parente8d22642105d57007ab1242848a8cbadc7f179df
bpo-24792: Fix zipimporter masking the cause of import errors (GH-22204)

zipimport's _unmarshal_code swallows import errors and then _get_module_code doesn't know the cause of the error, and returns the generic, and sometimes incorrect, 'could not find...'.

Automerge-Triggered-By: GH:brettcannon
Doc/library/zipimport.rst
Lib/test/test_zipimport.py
Lib/zipimport.py
Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst [new file with mode: 0644]
Python/importlib_zipimport.h