changeset 29787:279cd80059d4

performance: disable workaround for an old bug of Python gc Since disabling the gc does things worse for pypy and the bug was fixed in 2.7, let's only enable it in <2.7
author Maciej Fijalkowski <fijall@gmail.com>
date Thu, 28 Jul 2016 14:18:01 +0200
parents 978b907d9b36
children afa74947a414
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Fri Aug 12 05:56:40 2016 -0700
+++ b/mercurial/util.py	Thu Jul 28 14:18:01 2016 +0200
@@ -881,6 +881,8 @@
 
     This garbage collector issue have been fixed in 2.7.
     """
+    if sys.version >= (2, 7):
+        return func
     def wrapper(*args, **kwargs):
         gcenabled = gc.isenabled()
         gc.disable()