<p dir="ltr">Does a follow-up that replaces util.deque with collections.deque make sense? I suppose the hack was the only reason for the alias...</p>
<br><div class="gmail_quote">On Sat, May 16, 2015, 01:52 Adrian Buehlmann <<a href="mailto:adrian@cadifra.com">adrian@cadifra.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Adrian Buehlmann <<a href="mailto:adrian@cadifra.com" target="_blank">adrian@cadifra.com</a>><br>
# Date 1431759801 -7200<br>
# Node ID 3d14c1217117795e3b792369224ed7fa68e31123<br>
# Parent  1ef96a3b8b89a896f2c9f3f977dbef8f45bb0e26<br>
util: kill Python 2.4 deque.remove hack<br>
<br>
diff --git a/mercurial/util.py b/mercurial/util.py<br>
--- a/mercurial/util.py<br>
+++ b/mercurial/util.py<br>
@@ -334,17 +334,7 @@<br>
<br>
     return f<br>
<br>
-try:<br>
-    collections.deque.remove<br>
-    deque = collections.deque<br>
-except AttributeError:<br>
-    # python 2.4 lacks deque.remove<br>
-    class deque(collections.deque):<br>
-        def remove(self, val):<br>
-            for i, v in enumerate(self):<br>
-                if v == val:<br>
-                    del self[i]<br>
-                    break<br>
+deque = collections.deque<br>
<br>
 class sortdict(dict):<br>
     '''a simple sorted dictionary'''<br>
_______________________________________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@selenic.com" target="_blank">Mercurial-devel@selenic.com</a><br>
<a href="http://selenic.com/mailman/listinfo/mercurial-devel" target="_blank">http://selenic.com/mailman/listinfo/mercurial-devel</a><br>
</blockquote></div>