[Python-checkins] benchmarks: Block the use of markupsafe in the Mako benchmarks to keep them
brett.cannon
python-checkins at python.org
Fri Nov 2 19:48:59 CET 2012
http://hg.python.org/benchmarks/rev/a4433106dbf1
changeset: 190:a4433106dbf1
user: Brett Cannon <brett at python.org>
date: Fri Nov 02 14:48:53 2012 -0400
summary:
Block the use of markupsafe in the Mako benchmarks to keep them
consistent in case markupsafe is globally installed.
files:
performance/bm_mako_v2.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/performance/bm_mako_v2.py b/performance/bm_mako_v2.py
--- a/performance/bm_mako_v2.py
+++ b/performance/bm_mako_v2.py
@@ -21,7 +21,8 @@
from compat import xrange
import util
-# Mako imports
+# Mako imports (w/o markupsafe)
+sys.modules['markupsafe'] = None
from mako.template import Template
from mako.lookup import TemplateLookup
@@ -29,7 +30,7 @@
LOREM_IPSUM = """Quisque lobortis hendrerit posuere. Curabitur
aliquet consequat sapien molestie pretium. Nunc adipiscing luc
tus mi, viverra porttitor lorem vulputate et. Ut at purus sem,
-sed tincidunt ante. Vestibulum ante ipsum primis in faucibus
+sed tincidunt ante. Vestibulum ante ipsum primis in faucibus
orci luctus et ultrices posuere cubilia Curae; Praesent pulvinar
sodales justo at congue. Praesent aliquet facilisis nisl a
molestie. Sed tempus nisl ut augue eleifend tincidunt. Sed a
@@ -124,7 +125,7 @@
lookup.put_string('page.mako', PAGE_TEMPLATE)
template = Template(CONTENT_TEMPLATE, lookup=lookup)
-
+
table = [xrange(150) for i in xrange(150)]
paragraphs = xrange(50)
title = 'Hello world!'
--
Repository URL: http://hg.python.org/benchmarks
More information about the Python-checkins
mailing list