comparison hgdemandimport/__init__.py @ 49272:fda7ec505dc5 stable

demandimport: eagerly load msvcrt module on PyPy
author Manuel Jacob <me@manueljacob.de>
date Thu, 02 Jun 2022 02:05:11 +0200
parents 07731064ac41
children 127d33e63d1a
comparison
equal deleted inserted replaced
49270:a31245a984f2 49272:fda7ec505dc5
64 _pypy = '__pypy__' in sys.builtin_module_names 64 _pypy = '__pypy__' in sys.builtin_module_names
65 65
66 if _pypy: 66 if _pypy:
67 # _ctypes.pointer is shadowed by "from ... import pointer" (PyPy 5) 67 # _ctypes.pointer is shadowed by "from ... import pointer" (PyPy 5)
68 IGNORES.add('_ctypes.pointer') 68 IGNORES.add('_ctypes.pointer')
69 # pure Python module on PyPy, must be loaded to raise ModuleNotFoundError
70 # on non-Windows platforms
71 IGNORES.add('msvcrt')
69 72
70 demandimport.init(IGNORES) 73 demandimport.init(IGNORES)
71 74
72 # Re-export. 75 # Re-export.
73 isenabled = demandimport.isenabled 76 isenabled = demandimport.isenabled