Commit f146b387 authored by Petr Viktorin's avatar Petr Viktorin

Avoid deprecated load_module() in pkg_resources namespace delaration

Fixes: https://github.com/pypa/setuptools/issues/2493
parent 95a9c474
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