##// END OF EJS Templates
demandimportpy3: only use lazy extension loader on Python 3.6+...
Gregory Szorc -
r43695:2d31ef3f stable
parent child Browse files
Show More
@@ -53,9 +53,13 b' class _lazyloaderex(importlib.util.LazyL'
53
53
54 # This is 3.6+ because with Python 3.5 it isn't possible to lazily load
54 # This is 3.6+ because with Python 3.5 it isn't possible to lazily load
55 # extensions. See the discussion in https://bugs.python.org/issue26186 for more.
55 # extensions. See the discussion in https://bugs.python.org/issue26186 for more.
56 _extensions_loader = _lazyloaderex.factory(
56 if sys.version_info[0:2] >= (3, 6):
57 importlib.machinery.ExtensionFileLoader
57 _extensions_loader = _lazyloaderex.factory(
58 )
58 importlib.machinery.ExtensionFileLoader
59 )
60 else:
61 _extensions_loader = importlib.machinery.ExtensionFileLoader
62
59 _bytecode_loader = _lazyloaderex.factory(
63 _bytecode_loader = _lazyloaderex.factory(
60 importlib.machinery.SourcelessFileLoader
64 importlib.machinery.SourcelessFileLoader
61 )
65 )
General Comments 0
You need to be logged in to leave comments. Login now