◐ Shell
clean mode source ↗

Message 183177 - Python tracker

I'm trying to remove all uses of imp.find_module()/load_module() and multiprocessing seems to have a single use of both purely for (re)loading a module. The attached patch moves over to importlib.find_loader() and subsequent load_module() call to match the semantics of imp.find_module()/load_module(). If a guaranteed reload is not necessary then importlib.import_module() is a single-line change.

I ran the test suite, but there don't seem to be any explicit tests for this chunk of code (or am I missing something?).