You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As for the calling of load_module in pkg_resources.__init__, it seems to me that the only purpose of the call is to ensure the module is loaded, so that its __path__ can be fixed up using _rebuild_mod_path. The call uses the default loader.
So, it could be replaced by importlib.import_module(packageName). From the load_module docs, the only thing it does in addition to what import_module does is reloading the module if it already exists. To me, that seems like an unintended side effect.
But I could also be off; the docs are written for implementing of loaders, not for calling them.