changeset 30022:bf94fe556f16

demandimport: add '_ctypes.pointer' to ignore list on PyPy The pointer module is shadowed by a subsequent import. Our demand importer can't handle this because both sub modules and attributes live in the same namespace. https://bitbucket.org/pypy/pypy/src/release-5.0.1/lib_pypy/_ctypes/__init__.py#__init__.py-5
author Yuya Nishihara <yuya@tcha.org>
date Tue, 27 Sep 2016 22:36:00 +0900
parents 6ca3c54f801b
children 16a09ae318b4
files mercurial/demandimport.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/demandimport.py	Mon Sep 26 16:12:40 2016 +0800
+++ b/mercurial/demandimport.py	Tue Sep 27 22:36:00 2016 +0900
@@ -287,6 +287,12 @@
     'distutils.msvc9compiler',
     ]
 
+if _pypy:
+    ignore.extend([
+        # _ctypes.pointer is shadowed by "from ... import pointer" (PyPy 5)
+        '_ctypes.pointer',
+    ])
+
 def isenabled():
     return builtins.__import__ == _demandimport