]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 20 Sep 2013 18:24:39 +0000 (21:24 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 20 Sep 2013 18:24:39 +0000 (21:24 +0300)
binaries.

Lib/sre_compile.py
Lib/sre_constants.py
Lib/sre_parse.py
Misc/NEWS

index 9f59c770dc49f3b57a852daf22a798f23bc97ff6..b6b377f25bc742fafc6ff95bf59734a8d964d980 100644 (file)
@@ -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"
 
index 5898d5411a93751dc0235017c58bc46fb18ff337..3fb5eac3228f562db9755a328b0f2602e3c40e4c 100644 (file)
 
 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?
index f26229fc2870afd7476ad912bef33f69a03675d2..8a77790b08d80db3cca8c959ab1e9de5a59c9f3a 100644 (file)
@@ -15,7 +15,6 @@
 import sys
 
 from sre_constants import *
-from _sre import MAXREPEAT
 
 SPECIAL_CHARS = ".\\[{()*+?^$|"
 REPEAT_CHARS = "*+?{"
index 8570371e6de27bb07c4a8c303b6998fbbaaeb8a6..451aba63bae4ca1cdaa1b55c41385a9266e64e4e 100644 (file)
--- 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.