[pypy-svn] r71389 - pypy/trunk/pypy/objspace/std
benjamin at codespeak.net
benjamin at codespeak.net
Mon Feb 22 01:51:42 CET 2010
Author: benjamin
Date: Mon Feb 22 01:51:41 2010
New Revision: 71389
Modified:
pypy/trunk/pypy/objspace/std/typetype.py
Log:
only disable the method cache if it's needed
Modified: pypy/trunk/pypy/objspace/std/typetype.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/typetype.py (original)
+++ pypy/trunk/pypy/objspace/std/typetype.py Mon Feb 22 01:51:41 2010
@@ -160,7 +160,9 @@
cls.mro_w = old_mro
w_type.bases_w = saved_bases_w
raise
- if not is_mro_purely_of_types(w_type.mro_w):
+ if (space.config.objspace.std.withtypeversion and
+ w_type.version_tag() is not None and
+ not is_mro_purely_of_types(w_type.mro_w)):
# Disable method cache if the hierarchy isn't pure.
w_type._version_tag = None
for w_subclass in w_type.get_subclasses():
More information about the Pypy-commit
mailing list