##// END OF EJS Templates
demandimport: use absolute_import
Gregory Szorc -
r25943:3beed01d default
parent child Browse files
Show More
@@ -24,8 +24,11 b' These imports will not be delayed:'
24 b = __import__(a)
24 b = __import__(a)
25 '''
25 '''
26
26
27 import os, sys
27 from __future__ import absolute_import
28 from contextlib import contextmanager
28
29 import contextlib
30 import os
31 import sys
29
32
30 # __builtin__ in Python 2, builtins in Python 3.
33 # __builtin__ in Python 2, builtins in Python 3.
31 try:
34 try:
@@ -33,6 +36,8 b' try:'
33 except ImportError:
36 except ImportError:
34 import builtins
37 import builtins
35
38
39 contextmanager = contextlib.contextmanager
40
36 _origimport = __import__
41 _origimport = __import__
37
42
38 nothing = object()
43 nothing = object()
General Comments 0
You need to be logged in to leave comments. Login now