bpo-41718: runpy now imports pkgutil in functions by vstinner · Pull Request #24996 · python/cpython

@vstinner

Reduce the number of modules imported by "python3 -m module".

The runpy module no longer imports at startup (in the module body),
but only in functions using it: _get_code_from_file() and run_path().