comparison mercurial/demandimport.py @ 30156:75c71c533977

demandimport: disable lazy import of __builtin__ Demandimport uses the "try to import __builtin__, else use builtins" trick to handle Python 3. External libraries and extensions might do something similar. On Fedora 25 subversion-python-1.9.4-4.fc25.x86_64 will do just that (except the opposite) ... and it failed all subversion convert tests because demandimport was hiding that it didn't have builtins but should use __builtin__. The builtin module has already been imported when demandimport is loaded so there is no point in trying to import it on demand. Just always ignore both variants in demandimport.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 14 Oct 2016 03:03:39 +0200
parents 26a4e46af2bc
children 1914db1b7d9e
comparison
equal deleted inserted replaced
30155:b7a966ce89ed 30156:75c71c533977
289 'rfc822', 289 'rfc822',
290 'mimetools', 290 'mimetools',
291 'sqlalchemy.events', # has import-time side effects (issue5085) 291 'sqlalchemy.events', # has import-time side effects (issue5085)
292 # setuptools 8 expects this module to explode early when not on windows 292 # setuptools 8 expects this module to explode early when not on windows
293 'distutils.msvc9compiler', 293 'distutils.msvc9compiler',
294 '__builtin__',
295 'builtins',
294 ] 296 ]
295 297
296 if _pypy: 298 if _pypy:
297 ignore.extend([ 299 ignore.extend([
298 # _ctypes.pointer is shadowed by "from ... import pointer" (PyPy 5) 300 # _ctypes.pointer is shadowed by "from ... import pointer" (PyPy 5)