changeset 25112:3d14c1217117

util: kill Python 2.4 deque.remove hack
author Adrian Buehlmann <adrian@cadifra.com>
date Sat, 16 May 2015 09:03:21 +0200
parents 1ef96a3b8b89
children 0ca8410ea345
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Thu May 14 17:38:38 2015 +0200
+++ b/mercurial/util.py	Sat May 16 09:03:21 2015 +0200
@@ -334,17 +334,7 @@
 
     return f
 
-try:
-    collections.deque.remove
-    deque = collections.deque
-except AttributeError:
-    # python 2.4 lacks deque.remove
-    class deque(collections.deque):
-        def remove(self, val):
-            for i, v in enumerate(self):
-                if v == val:
-                    del self[i]
-                    break
+deque = collections.deque
 
 class sortdict(dict):
     '''a simple sorted dictionary'''