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:
See T196619
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:
See T196619
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
api.py: check if QueryGenerator support namespaces (updated) | pywikibot/core | master | +127 -18 | |
apy.py: check if QueryGenerator support namespaces | pywikibot/core | master | +124 -13 |
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
Change 482496 merged by jenkins-bot:
[pywikibot/core@master] apy.py: check if QueryGenerator support namespaces
Change 489905 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] apy.py: check if QueryGenerator support namespaces (updated)
Change 489905 merged by jenkins-bot:
[pywikibot/core@master] api.py: check if QueryGenerator support namespaces (updated)
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