Page MenuHomePhabricator

Always enable namespace filtering in QueryGenerator
Open, MediumPublic

Description

Pagegenerators filtering always assumes that QueryGenerators have a namespace parameter but there some which haven't. Our api module should do this job instead of writing:

WARNING: querypage module does not support a namespace parameter

See T196619

Details

Event Timeline

Xqt created this task.Jun 29 2018, 7:13 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJun 29 2018, 7:13 AM
Xqt triaged this task as Medium priority.Jun 29 2018, 7:14 AM
Xqt updated the task description. (Show Details)
Mpaa added subscribers: zhuyifei1999, Mpaa.EditedJul 21 2018, 8:09 PM

IMO, the API should do what it can, the rest should be done outside.
I agree with @zhuyifei1999 in T196619 that an exception should be raised, instead of a warning.

Change 482496 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] apy.py: raise exception in QueryGenerator.set_namespaces(), instead of a warning

https://gerrit.wikimedia.org/r/482496

Xqt assigned this task to Mpaa.Feb 7 2019, 4:29 PM

Change 482496 merged by jenkins-bot:
[pywikibot/core@master] apy.py: check if QueryGenerator support namespaces

https://gerrit.wikimedia.org/r/482496

Change 489905 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] apy.py: check if QueryGenerator support namespaces (updated)

https://gerrit.wikimedia.org/r/489905

Change 489905 merged by jenkins-bot:
[pywikibot/core@master] api.py: check if QueryGenerator support namespaces (updated)

https://gerrit.wikimedia.org/r/489905

Is this fixed?