From: Serhiy Storchaka Date: Thu, 30 Oct 2014 23:37:03 +0000 (+0200) Subject: Fixed compile error in issue #22410. The _locale module is optional. X-Git-Tag: v3.5.0a1~560 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3bf7a6c1dada9842fb0d53ac3818f20540933c8f;p=thirdparty%2FPython%2Fcpython.git Fixed compile error in issue #22410. The _locale module is optional. --- 3bf7a6c1dada9842fb0d53ac3818f20540933c8f diff --cc Lib/re.py index e731a69bca31,199afee4b904..0b1cb46ab32d --- a/Lib/re.py +++ b/Lib/re.py @@@ -122,16 -122,16 +122,19 @@@ This module also defines an exception ' import sys import sre_compile import sre_parse - import _locale + try: + import _locale + except ImportError: + _locale = None # public symbols -__all__ = [ "match", "fullmatch", "search", "sub", "subn", "split", "findall", - "compile", "purge", "template", "escape", "A", "I", "L", "M", "S", "X", - "U", "ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE", - "UNICODE", "error" ] +__all__ = [ + "match", "fullmatch", "search", "sub", "subn", "split", + "findall", "finditer", "compile", "purge", "template", "escape", + "error", "A", "I", "L", "M", "S", "X", "U", + "ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE", + "UNICODE", +] __version__ = "2.2.1"