← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-zip-2 into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-zip-2 into launchpad:master.

Commit message:
Don't assume zip returns a list (take 2)

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/397689

I missed a couple of bits in https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/395909.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-zip-2 into launchpad:master.
diff --git a/lib/lp/bugs/scripts/bugtasktargetnamecaches.py b/lib/lp/bugs/scripts/bugtasktargetnamecaches.py
index 5e4cb1e..2ab3a73 100644
--- a/lib/lp/bugs/scripts/bugtasktargetnamecaches.py
+++ b/lib/lp/bugs/scripts/bugtasktargetnamecaches.py
@@ -93,7 +93,7 @@ class BugTaskTargetNameCachesTunableLoop(object):
         store = IMasterStore(BugTask)
 
         # Transpose the target rows into lists of object IDs to retrieve.
-        ids_to_cache = zip(*(target for (target, names) in chunk))
+        ids_to_cache = list(zip(*(target for (target, names) in chunk)))
         for index, cls in enumerate(target_classes):
             # Get all of the objects that we will need into the cache.
             list(store.find(cls, cls.id.is_in(set(ids_to_cache[index]))))
diff --git a/lib/lp/code/browser/bazaar.py b/lib/lp/code/browser/bazaar.py
index 305c740..85829af 100644
--- a/lib/lp/code/browser/bazaar.py
+++ b/lib/lp/code/browser/bazaar.py
@@ -185,7 +185,7 @@ class BazaarProductView(LaunchpadView):
         if len(product_info) == 0:
             return
         now = datetime.today()
-        counts = sorted(zip(*product_info)[1])
+        counts = sorted(list(zip(*product_info))[1])
         size_mapping = {
             0.2: 'smallest',
             0.4: 'small',