comparison mercurial/__init__.py @ 31307:f8d41edd0357

init: zstd is already python3-ready, so don't run it through our importer
author Augie Fackler <raf@durin42.com>
date Wed, 08 Mar 2017 18:11:19 -0500
parents 7c54917b31f6
children 8a17c541177f
comparison
equal deleted inserted replaced
31306:c920efa9d34b 31307:f8d41edd0357
134 class hgpathentryfinder(importlib.abc.MetaPathFinder): 134 class hgpathentryfinder(importlib.abc.MetaPathFinder):
135 """A sys.meta_path finder that uses a custom module loader.""" 135 """A sys.meta_path finder that uses a custom module loader."""
136 def find_spec(self, fullname, path, target=None): 136 def find_spec(self, fullname, path, target=None):
137 # Only handle Mercurial-related modules. 137 # Only handle Mercurial-related modules.
138 if not fullname.startswith(('mercurial.', 'hgext.', 'hgext3rd.')): 138 if not fullname.startswith(('mercurial.', 'hgext.', 'hgext3rd.')):
139 return None
140 # zstd is already dual-version clean, don't try and mangle it
141 if fullname.startswith('mercurial.zstd'):
139 return None 142 return None
140 143
141 # This assumes Python 3 doesn't support loading C modules. 144 # This assumes Python 3 doesn't support loading C modules.
142 if fullname in _dualmodules: 145 if fullname in _dualmodules:
143 stem = fullname.split('.')[-1] 146 stem = fullname.split('.')[-1]