From fa872505e9ec3e8f33e52ad5c0fba6a3aea4bbd1 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Tue, 27 Sep 2016 22:36:00 +0900 Subject: [PATCH] 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 --- mercurial/demandimport.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py index 7f81a5afe3..d37b2cb5d8 100644 --- a/mercurial/demandimport.py +++ b/mercurial/demandimport.py @@ -287,6 +287,12 @@ ignore = [ 'distutils.msvc9compiler', ] +if _pypy: + ignore.extend([ + # _ctypes.pointer is shadowed by "from ... import pointer" (PyPy 5) + '_ctypes.pointer', + ]) + def isenabled(): return builtins.__import__ == _demandimport