diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-20 18:25:53 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-20 18:25:53 (GMT) |
commit | 60bf0e4daa4a498d53c37dba93cf03dd0c1924e8 (patch) | |
tree | abad8bb113f031af764e23e4087344fb534a91a7 | |
parent | f1c1cd9b3b457feeab41123da6d0d9a0040727b4 (diff) | |
download | cpython-60bf0e4daa4a498d53c37dba93cf03dd0c1924e8.zip cpython-60bf0e4daa4a498d53c37dba93cf03dd0c1924e8.tar.gz cpython-60bf0e4daa4a498d53c37dba93cf03dd0c1924e8.tar.bz2 |
Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3
and older binaries.
-rw-r--r-- | Lib/sre_compile.py | 1 | ||||
-rw-r--r-- | Lib/sre_constants.py | 6 | ||||
-rw-r--r-- | Lib/sre_parse.py | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
4 files changed, 8 insertions, 3 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 15d2324..97c1663 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -13,7 +13,6 @@ import _sre, sys import sre_parse from sre_constants import * -from _sre import MAXREPEAT assert _sre.MAGIC == MAGIC, "SRE module mismatch" diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index b0175e7..69224e2 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py @@ -15,7 +15,11 @@ MAGIC = 20031017 -from _sre import MAXREPEAT +try: + from _sre import MAXREPEAT +except ImportError: + import _sre + MAXREPEAT = _sre.MAXREPEAT = 65535 # SRE standard exception (access as sre.error) # should this really be here? diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index e8d35a6..e37e2cf 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -15,7 +15,6 @@ import sys from sre_constants import * -from _sre import MAXREPEAT SPECIAL_CHARS = ".\\[{()*+?^$|" REPEAT_CHARS = "*+?{" @@ -32,6 +32,9 @@ Core and Builtins Library ------- +- Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3 + and older binaries. + - Issue #19037: The mailbox module now makes all changes to maildir files before moving them into place, to avoid race conditions with other programs that may be accessing the maildir directory. |