comparison mercurial/demandimport.py @ 14976:04a950b1c2ad

demandimport: blacklist rfc822 and mimetools to prevent spurious warnings
author Augie Fackler <durin42@gmail.com>
date Tue, 01 Mar 2011 23:35:22 -0600
parents 4db5bfea1b07
children 1dbd42a02153
comparison
equal deleted inserted replaced
14975:b64538363dbe 14976:04a950b1c2ad
135 'gtk', 135 'gtk',
136 # setuptools' pkg_resources.py expects "from __main__ import x" to 136 # setuptools' pkg_resources.py expects "from __main__ import x" to
137 # raise ImportError if x not defined 137 # raise ImportError if x not defined
138 '__main__', 138 '__main__',
139 '_ssl', # conditional imports in the stdlib, issue1964 139 '_ssl', # conditional imports in the stdlib, issue1964
140 'rfc822',
141 'mimetools',
140 ] 142 ]
141 143
142 def enable(): 144 def enable():
143 "enable global demand-loading of modules" 145 "enable global demand-loading of modules"
144 __builtin__.__import__ = _demandimport 146 __builtin__.__import__ = _demandimport