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.
Apparently pkg_resources is importing importlib._bootstrap, which is not meant to be directly imported. It is used later to get SourceFileLoader and FileFinder. I noticed this due to a failing test (test_venv) in the CPython suite when I moved both those classes to a different file (no longer in _bootstrap.py). See http://bugs.python.org/issue23911.
Starting in Python 3.3 the two classes are exposed in importlib.machinery. I'd recommend updating the code to look something like this:
if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
from importlib.machinery import SourceFileLoader, FileFinder
SourceFileLoader = FileFinder = None
and update the rest of the file (3 spots) accordingly.