Commit 4e2c005f authored by Jason R. Coombs's avatar Jason R. Coombs

Use pkgutil namespace. Still export get_importer as it's referenced in __all__.

--HG--
extra : amend_source : fe3ad40ffbb67cc7f3407a37ac42671ea3ecb983
parent 7e656969
......@@ -11,6 +11,8 @@ CHANGES
* Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients
expecting this boolean variable should use ``site.ENABLE_USER_SITE``
instead.
* Removed ``pkg_resources.ImpWrapper``. Clients that expected this class
should use ``pkgutil.ImpImporter`` instead.
-----
1.4.1
......
......@@ -23,7 +23,8 @@ import zipimport
import warnings
import stat
import functools
from pkgutil import get_importer, ImpImporter as ImpWrapper
import pkgutil
from pkgutil import get_importer
try:
from urlparse import urlparse, urlunparse
......@@ -1778,7 +1779,7 @@ def find_on_path(importer, path_item, only=False):
for item in find_distributions(os.path.join(path_item,line.rstrip())):
yield item
break
register_finder(ImpWrapper,find_on_path)
register_finder(pkgutil.ImpImporter,find_on_path)
if importlib_bootstrap is not None:
register_finder(importlib_bootstrap.FileFinder, find_on_path)
......@@ -1882,7 +1883,7 @@ def file_ns_handler(importer, path_item, packageName, module):
# Only return the path if it's not already there
return subpath
register_namespace_handler(ImpWrapper,file_ns_handler)
register_namespace_handler(pkgutil.ImpImporter,file_ns_handler)
register_namespace_handler(zipimport.zipimporter,file_ns_handler)
if importlib_bootstrap is not None:
......
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