Mercurial > cpython-lru_cache-weakref
diff Python/importlib.h @ 84109:3a50025f1900
Issue #15767: Touch up ModuleNotFoundError usage by import.
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.
Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.
Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Wed, 12 Jun 2013 23:29:18 -0400 |
| parents | 8a0ed9f63c6e |
| children | 5619bc2d8207 |
line wrap: on
line diff
--- a/Python/importlib.h Wed Jun 12 21:25:59 2013 -0400 +++ b/Python/importlib.h Wed Jun 12 23:29:18 2013 -0400 @@ -3239,8 +3239,8 @@ 0,114,64,1,0,0,114,59,1,0,0,114,96,0,0,0, 114,56,1,0,0,114,7,0,0,0,114,145,0,0,0,114, 69,1,0,0,244,11,0,0,0,95,103,99,100,95,105,109, - 112,111,114,116,114,97,0,0,0,114,46,0,0,0,114,156, - 0,0,0,114,98,0,0,0,40,5,0,0,0,114,66,0, + 112,111,114,116,114,97,0,0,0,114,46,0,0,0,114,66, + 1,0,0,114,98,0,0,0,40,5,0,0,0,114,66,0, 0,0,114,57,1,0,0,114,58,1,0,0,114,160,0,0, 0,114,139,0,0,0,114,4,0,0,0,114,4,0,0,0, 114,5,0,0,0,114,70,1,0,0,61,6,0,0,115,26,
