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

Event Timeline

Xqt triaged this task as Medium priority.Jun 29 2018, 7:14 AM
Xqt updated the task description. (Show Details)

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

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

This comment was removed by Dvorapa.

Okay, should we remove it?

It will be a Breaking Change, please update your code ASAP, due date July, 31st 2019

https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/data/api.py$2668

Okay, should we remove it?

It will be a Breaking Change, please update your code ASAP, due date July, 31st 2019

https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/data/api.py$2668

From me yes. I guess pagegenerators follow this change already

Mpaa removed Mpaa as the assignee of this task.Oct 27 2020, 6:04 PM