summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-09-20 18:24:39 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-09-20 18:24:39 (GMT)
commitc8bf95cfc58d92c365abd4c958feb15f872b2a29 (patch)
tree5e7bf254c839c1b018a01f52c5875fca8cd54525
parent2a97cee5eda632a7737bf01608c0f6638cd3fea0 (diff)
downloadcpython-c8bf95cfc58d92c365abd4c958feb15f872b2a29.zip
cpython-c8bf95cfc58d92c365abd4c958feb15f872b2a29.tar.gz
cpython-c8bf95cfc58d92c365abd4c958feb15f872b2a29.tar.bz2
Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0
binaries.
-rw-r--r--Lib/sre_compile.py1
-rw-r--r--Lib/sre_constants.py6
-rw-r--r--Lib/sre_parse.py1
-rw-r--r--Misc/NEWS3
4 files changed, 8 insertions, 3 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 9f59c77..b6b377f 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 5898d54..3fb5eac 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 f26229f..8a77790 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 = "*+?{"
diff --git a/Misc/NEWS b/Misc/NEWS
index 8570371..451aba6 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,9 @@ Core and Builtins
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.