jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/445855 )
Change subject: [cleanup] deprecate DuplicateFilterPageGenerator ......................................................................
[cleanup] deprecate DuplicateFilterPageGenerator
deprecate redirected pagegenerators.DuplicateFilterPageGenerator and use tools.filter_unique instead
Change-Id: I32ef9cf4550b43febac06fd9bda7be3a3962cc71 --- M pywikibot/pagegenerators.py M scripts/nowcommons.py M scripts/template.py 3 files changed, 6 insertions(+), 6 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index facac41..b08b7fc 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -1726,9 +1726,6 @@ % page)
-DuplicateFilterPageGenerator = filter_unique - - class ItemClaimFilter(object):
"""Item claim filter.""" @@ -3089,6 +3086,8 @@ yield page
+DuplicateFilterPageGenerator = redirect_func( + filter_unique, old_name='DuplicateFilterPageGenerator') PreloadingItemGenerator = redirect_func(PreloadingEntityGenerator, old_name='PreloadingItemGenerator') # Deprecated old names available for compatibility with compat. diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py index f003f97..a82f52a 100755 --- a/scripts/nowcommons.py +++ b/scripts/nowcommons.py @@ -62,6 +62,7 @@
from pywikibot import i18n, Bot from pywikibot import pagegenerators as pg +from pywikibot.tools import filter_unique from pywikibot.tools.formatter import color_format
from scripts.image import ImageRobot as ImageBot @@ -221,7 +222,7 @@ only_template_inclusion=True) for t in self.nc_templates) gen = chain(*gens) - gen = pg.DuplicateFilterPageGenerator(gen) + gen = filter_unique(gen) gen = pg.PreloadingGenerator(gen) return gen
diff --git a/scripts/template.py b/scripts/template.py index 630e059..2f305ea 100755 --- a/scripts/template.py +++ b/scripts/template.py @@ -125,7 +125,7 @@
from pywikibot.exceptions import ArgumentDeprecationWarning from pywikibot.pagegenerators import XMLDumpPageGenerator -from pywikibot.tools import deprecated +from pywikibot.tools import deprecated, filter_unique
from scripts.replace import ReplaceRobot as ReplaceBot
@@ -359,7 +359,7 @@ for t in old_templates ) gen = chain(*gens) - gen = pagegenerators.DuplicateFilterPageGenerator(gen) + gen = filter_unique(gen) if user: gen = pagegenerators.UserEditFilterGenerator(gen, user, timestamp, skip,
pywikibot-commits@lists.wikimedia.org