(original) (raw)

changeset: 85758:68a7d77a90c3 branch: 3.3 parent: 85755:2b7f11ba871c user: Serhiy Storchaka storchaka@gmail.com date: Fri Sep 20 21:24:39 2013 +0300 files: Lib/sre_compile.py Lib/sre_constants.py Lib/sre_parse.py Misc/NEWS description: Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0 binaries. diff -r 2b7f11ba871c -r 68a7d77a90c3 Lib/sre_compile.py --- a/Lib/sre_compile.py Thu Sep 19 00:08:56 2013 -0700 +++ b/Lib/sre_compile.py Fri Sep 20 21:24:39 2013 +0300 @@ -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 -r 2b7f11ba871c -r 68a7d77a90c3 Lib/sre_constants.py --- a/Lib/sre_constants.py Thu Sep 19 00:08:56 2013 -0700 +++ b/Lib/sre_constants.py Fri Sep 20 21:24:39 2013 +0300 @@ -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 -r 2b7f11ba871c -r 68a7d77a90c3 Lib/sre_parse.py --- a/Lib/sre_parse.py Thu Sep 19 00:08:56 2013 -0700 +++ b/Lib/sre_parse.py Fri Sep 20 21:24:39 2013 +0300 @@ -15,7 +15,6 @@ import sys from sre_constants import * -from _sre import MAXREPEAT SPECIAL_CHARS = ".\\[{()*+?^$|" REPEAT_CHARS = "*+?{" diff -r 2b7f11ba871c -r 68a7d77a90c3 Misc/NEWS --- a/Misc/NEWS Thu Sep 19 00:08:56 2013 -0700 +++ b/Misc/NEWS Fri Sep 20 21:24:39 2013 +0300 @@ -68,6 +68,9 @@ Library ------- +- Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0 + 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. /storchaka@gmail.com