# HG changeset patch # User Gregory Szorc # Date 2016-02-26 06:35:11 # Node ID f5b2b358b8b7a61389b1d33f7eb1fd581ca81aef # Parent b966e35aad78dfa3e132291261b7a77f4a0b9ff5 demandimport: add _imp to ignore list Mozilla is seeing an issue with demand importing of _imp failing in pkg_resources/__init__.py:fixup_namespace_packages. It strangely only reproduces when using a modern version of setuptools/pip in certain scenarios. Adding _imp to the demand import ignore list seems to make the problem go away. diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py --- a/mercurial/demandimport.py +++ b/mercurial/demandimport.py @@ -230,6 +230,8 @@ def _demandimport(name, globals=None, lo ignore = [ '__future__', '_hashlib', + # ImportError during pkg_resources/__init__.py:fixup_namespace_package + '_imp', '_xmlplus', 'fcntl', 'win32com.gen_py',