py3: filter() now returns a generator, so wrap when we need a list
authorMartin von Zweigbergk <martinvonz@google.com>
Sun, 14 Jul 2019 22:34:36 -0700
changeset 4741 e8727a27e380
parent 4740 f8ef6d5f56f2
child 4742 db3e7f6b5ceb
py3: filter() now returns a generator, so wrap when we need a list
hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py	Fri Jul 12 23:19:50 2019 -0700
+++ b/hgext3rd/evolve/obshistory.py	Sun Jul 14 22:34:36 2019 -0700
@@ -322,7 +322,7 @@
 
         # Filter out candidates, returns only nodes with all their successors
         # already shown
-        validcandidates = filter(isvalidcandidate, candidates)
+        validcandidates = list(filter(isvalidcandidate, candidates))
 
         # If we likely have a cycle
         if not validcandidates: