Author: Armin Rigo <[email protected]>
Branch:
Changeset: r59507:4df6614df240
Date: 2012-12-19 11:13 +0100
http://bitbucket.org/pypy/pypy/changeset/4df6614df240/
Log: On PyPy or other non-CPython implementations, calling gc.disable()
in timeit.py is bogus.
diff --git a/lib-python/2.7/timeit.py b/lib-python/2.7/timeit.py
--- a/lib-python/2.7/timeit.py
+++ b/lib-python/2.7/timeit.py
@@ -190,7 +190,8 @@
else:
it = [None] * number
gcold = gc.isenabled()
- gc.disable()
+ if '__pypy__' not in sys.builtin_module_names:
+ gc.disable() # only do that on CPython
try:
timing = self.inner(it, self.timer)
finally:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit