]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #15767: Touch up ModuleNotFoundError usage by import.
authorBrett Cannon <brett@python.org>
Thu, 13 Jun 2013 03:29:18 +0000 (23:29 -0400)
committerBrett Cannon <brett@python.org>
Thu, 13 Jun 2013 03:29:18 +0000 (23:29 -0400)
commit8f5ac5106eb24dd8bda91f25e993a90a820a2d5c
tree49b910fbfa1af58f0c017d42c84d507b338d7bb2
parent3e9a9ae09d6fc9169b01cba3efd1ae03ab40b237
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.
Doc/c-api/exceptions.rst
Doc/library/exceptions.rst
Doc/reference/import.rst
Doc/whatsnew/3.4.rst
Include/pyerrors.h
Lib/importlib/_bootstrap.py
Misc/NEWS
Python/errors.c
Python/import.c
Python/importlib.h