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. -- To view, visit https://gerrit.wikimedia.org/r/202949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6de064422d35625b50d4ff7b630041368d51de81 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Mpaa <mpaa.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits