jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/443027 )
Change subject: [bugfix] Enable namespace filtering for unconnected_pages GeneratorFactory ......................................................................
[bugfix] Enable namespace filtering for unconnected_pages GeneratorFactory
pagegenerators namespaces filter uses the api to get pages filtered by namespaces if the generator is a QueryGenerator. Otherwise it uses its internal NamespaceFilterPageGenerator. Unfortunately there are some api generators which does not have a namespace parameter.
Bug: T196619 Change-Id: If64aca45bdee4aadb3ccf56667c8eee4d5fb4e77 --- M pywikibot/pagegenerators.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 180b6a0..ec06f31 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -984,7 +984,8 @@
def _handle_unconnectedpages(self, value): """Handle `-unconnectedpages` argument.""" - return self.site.unconnected_pages(total=_int_none(value)) + # T196619 don't use QueryGenerator due to namespace filtering + return (p for p in self.site.unconnected_pages(total=_int_none(value)))
def _handle_imagesused(self, value): """Handle `-imagesused` argument."""
pywikibot-commits@lists.wikimedia.org