demandimport: add 'nt' to ignore list (issue5373)
authorYuya Nishihara <yuya@tcha.org>
Tue, 27 Sep 2016 21:56:00 +0900
changeset 30023 16a09ae318b4
parent 30022 bf94fe556f16
child 30024 26a4e46af2bc
demandimport: add 'nt' to ignore list (issue5373) pathlib2 tries to import nt. Since it is a built-in module, there should be no performance penalty. https://github.com/mcmtroffaes/pathlib2/blob/release/2.2.0/pathlib2.py#L33
mercurial/demandimport.py
--- a/mercurial/demandimport.py	Tue Sep 27 22:36:00 2016 +0900
+++ b/mercurial/demandimport.py	Tue Sep 27 21:56:00 2016 +0900
@@ -264,6 +264,7 @@
     '_imp',
     '_xmlplus',
     'fcntl',
+    'nt', # pathlib2 tests the existence of built-in 'nt' module
     'win32com.gen_py',
     '_winreg', # 2.7 mimetypes needs immediate ImportError
     'pythoncom',