Make imports in _module() Python 3 compatible (pattern.text)
@@ -2382,6 +2382,10 @@ _modules = {}
def _module(language):
""" Returns the given language module (e.g., "en" => pattern.en).
"""
+
+ if sys.version > '3':
+ return _modules.setdefault(language, __import__(language, globals(), {}, [], 1))
+ else:
return _modules.setdefault(language, __import__(language, globals(), {}, [], -1))
def _multilingual(function, *args, **kwargs):
