diff mercurial/__init__.py @ 32420:0906b85bf222

demandimport: move to separate package In Python 3, demand loading is per-package. Keeping demandimport in the mercurial package would disable demand loading for any modules in mercurial.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 21 May 2017 12:10:53 -0700
parents 5700825889fb
children 397e3a2e9347
line wrap: on
line diff
--- a/mercurial/__init__.py	Sun May 21 12:09:01 2017 -0700
+++ b/mercurial/__init__.py	Sun May 21 12:10:53 2017 -0700
@@ -9,6 +9,10 @@
 
 import sys
 
+# Allow 'from mercurial import demandimport' to keep working.
+import hgdemandimport
+demandimport = hgdemandimport
+
 __all__ = []
 
 # Python 3 uses a custom module loader that transforms source code between