jenkins-bot has submitted this change and it was merged.
Change subject: backward compatibility with compat ......................................................................
backward compatibility with compat
- mark "number" as deprecated for pg.NewimagesPageGenerator - NamespaceFilterPageGenerator may have a single item as namespaces
Change-Id: Ib4090d07cce977c7bfe8baa4878f12b10766af20 --- M pywikibot/pagegenerators.py 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index b7bf132..959e3fc 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -767,6 +767,8 @@ """ if site is None: site = pywikibot.Site() + if isinstance(namespaces, (int, basestring)): + namespaces = [namespaces] # convert namespace names to namespace numbers for i in range(len(namespaces)): ns = namespaces[i] @@ -897,6 +899,7 @@ yield i
+@deprecate_arg("number", "total") def NewimagesPageGenerator(step=None, total=None, site=None): if site is None: site = pywikibot.Site()