jenkins-bot merged this change.

View Change

Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
[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/
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pywikibot/ b/pywikibot/
index 180b6a0..ec06f31 100644
--- a/pywikibot/
+++ b/pywikibot/
@@ -984,7 +984,8 @@

def _handle_unconnectedpages(self, value):
"""Handle `-unconnectedpages` argument."""
- return
+ # T196619 don't use QueryGenerator due to namespace filtering
+ return (p for p in

def _handle_imagesused(self, value):
"""Handle `-imagesused` argument."""

To view, visit change 443027. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If64aca45bdee4aadb3ccf56667c8eee4d5fb4e77
Gerrit-Change-Number: 443027
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <>
Gerrit-Reviewer: JAn Dudík <>
Gerrit-Reviewer: John Vandenberg <>
Gerrit-Reviewer: Multichill <>
Gerrit-Reviewer: Xqt <>
Gerrit-Reviewer: Zhuyifei1999 <>
Gerrit-Reviewer: Zoranzoki21 <>
Gerrit-Reviewer: jenkins-bot