Mercurial > hg
changeset 28513:859af6e78368
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.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 12 Mar 2016 13:19:19 -0800 |
parents | b957b4c6cad8 |
children | 0747ef2c4ab2 |
files | mercurial/__init__.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/__init__.py Sat Mar 12 22:17:30 2016 +0900 +++ b/mercurial/__init__.py Sat Mar 12 13:19:19 2016 -0800 @@ -35,6 +35,11 @@ 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)