Commit 9ada3d6e authored by Thomas Wouters's avatar Thomas Wouters

Merge trunk up to 43069, putting re.py back and hopefully making the branch

usable again.
parent 725ccd18
...@@ -110,7 +110,7 @@ import sys ...@@ -110,7 +110,7 @@ import sys
import getopt import getopt
import random import random
import warnings import warnings
import sre import re
import cStringIO import cStringIO
import traceback import traceback
...@@ -525,7 +525,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False): ...@@ -525,7 +525,7 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
_path_created.clear() _path_created.clear()
warnings.filters[:] = fs warnings.filters[:] = fs
gc.collect() gc.collect()
sre.purge() re.purge()
_strptime._regex_cache.clear() _strptime._regex_cache.clear()
urlparse.clear_cache() urlparse.clear_cache()
urllib.urlcleanup() urllib.urlcleanup()
......
...@@ -145,7 +145,6 @@ class AllTest(unittest.TestCase): ...@@ -145,7 +145,6 @@ class AllTest(unittest.TestCase):
self.check_all("smtplib") self.check_all("smtplib")
self.check_all("sndhdr") self.check_all("sndhdr")
self.check_all("socket") self.check_all("socket")
self.check_all("sre")
self.check_all("_strptime") self.check_all("_strptime")
self.check_all("symtable") self.check_all("symtable")
self.check_all("tabnanny") self.check_all("tabnanny")
......
...@@ -3,7 +3,7 @@ sys.path = ['.'] + sys.path ...@@ -3,7 +3,7 @@ sys.path = ['.'] + sys.path
from test.test_support import verbose, run_unittest from test.test_support import verbose, run_unittest
import re import re
from sre import Scanner from re import Scanner
import sys, os, traceback import sys, os, traceback
from weakref import proxy from weakref import proxy
......
...@@ -51,6 +51,8 @@ static char copyright[] = ...@@ -51,6 +51,8 @@ static char copyright[] =
#define SRE_MODULE "sre" #define SRE_MODULE "sre"
#endif #endif
#define SRE_PY_MODULE "re"
/* defining this one enables tracing */ /* defining this one enables tracing */
#undef VERBOSE #undef VERBOSE
...@@ -2455,7 +2457,7 @@ pattern_subx(PatternObject* self, PyObject* template, PyObject* string, ...@@ -2455,7 +2457,7 @@ pattern_subx(PatternObject* self, PyObject* template, PyObject* string,
} else { } else {
/* not a literal; hand it over to the template compiler */ /* not a literal; hand it over to the template compiler */
filter = call( filter = call(
SRE_MODULE, "_subx", SRE_PY_MODULE, "_subx",
PyTuple_Pack(2, self, template) PyTuple_Pack(2, self, template)
); );
if (!filter) if (!filter)
...@@ -2872,7 +2874,7 @@ match_expand(MatchObject* self, PyObject* args) ...@@ -2872,7 +2874,7 @@ match_expand(MatchObject* self, PyObject* args)
/* delegate to Python code */ /* delegate to Python code */
return call( return call(
SRE_MODULE, "_expand", SRE_PY_MODULE, "_expand",
PyTuple_Pack(3, self->pattern, self, template) PyTuple_Pack(3, self->pattern, self, template)
); );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment