# HG changeset patch # User Gregory Szorc # Date 2016-03-12 21:19:19 # Node ID 859af6e78368600f724ccc26397ec30b145bffdb # Parent b957b4c6cad8f67f4a68935fe1c9300ec45b3755 mercurial: use pure Python module policy on Python 3 The C extensions don't yet work with Python 3. Let's minimize the work required to get Mercurial running on Python 3 by always using the pure Python module policy on Python 3. diff --git a/mercurial/__init__.py b/mercurial/__init__.py --- a/mercurial/__init__.py +++ b/mercurial/__init__.py @@ -35,6 +35,11 @@ except ImportError: if '__pypy__' in sys.builtin_module_names: modulepolicy = 'py' +# Our C extensions aren't yet compatible with Python 3. So use pure Python +# on Python 3 for now. +if sys.version_info[0] >= 3: + modulepolicy = 'py' + # Environment variable can always force settings. modulepolicy = os.environ.get('HGMODULEPOLICY', modulepolicy)