[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found by plusminushalf · Pull Request #972 · python/cpython

the-knights-who-say-ni

if _bootstrap._find_spec() return None, an ImportError is raised
stating: module could not be found in the path specified

brettcannon changed the title bpo-29851: Raising an ImportError if module not found bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found

Apr 3, 2017

Raising ModuleNotFounderror instead of ImportError
Changing error text

using a temperory modulue and destroying it's meta data
and trying to reload to raise ModuleNotFoundError exception

Submodule isin't needed to reproduce the error

brettcannon changed the title bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found [WIP] bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found

May 16, 2017

Adding version change to the documentation.
Uncaching the module so that we cleanup the mess made in sys.modules

plusminushalf changed the title [WIP] bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found

May 17, 2017