jenkins-bot has submitted this change and it was merged.
Change subject: intersect_generators cache simplification ......................................................................
intersect_generators cache simplification
The cache values for intersect_generators do not need to contain a tuple including the item, as all members of the set will be the same item.
Change-Id: I6de064422d35625b50d4ff7b630041368d51de81 --- M pywikibot/tools/__init__.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index b7de462..3e9bb9d 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -555,9 +555,9 @@ # TODO: evaluate if True and timeout is necessary. item = t.queue.get(True, 0.1)
- # Cache entry is a set of tuples (item, thread). + # Cache entry is a set of thread. # Duplicates from same thread are not counted twice. - cache[item].add((item, t)) + cache[item].add(t) if len(cache[item]) == n_gen: yield item # Remove item from cache.
pywikibot-commits@lists.wikimedia.org