Commit a54d9e6b authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #2523 from encukou/load_module

Avoid deprecated load_module() in pkg_resources namespace delaration
parents 3703869b f146b387
Use importlib.import_module() rather than the deprectated loader.load_module()
in pkg_resources namespace delaration -- by :user:`encukou`
......@@ -38,6 +38,7 @@ import itertools
import inspect
import ntpath
import posixpath
import importlib
from pkgutil import get_importer
try:
......@@ -2209,7 +2210,7 @@ def _handle_ns(packageName, path_item):
if subpath is not None:
path = module.__path__
path.append(subpath)
loader.load_module(packageName)
importlib.import_module(packageName)
_rebuild_mod_path(path, packageName, module)
return subpath
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment