Page MenuHomePhabricator

ParamInfo class can't differ between action/queryaction
Closed, ResolvedPublic


There are the actions [[|query+tokens]] and [[|tokens]] but it is impossible to differ between them using the ParamInfo class as it automatically chooses the query module (if there exist one).

This makes it hard to implement T85725 using this class as sometimes the query module and sometimes the action module is needed.

>>> 'tokens' in  pywikibot.Site('en', 'wikipedia')._paraminfo._query_modules
>>> 'tokens' in  pywikibot.Site('en', 'wikipedia')._paraminfo._action_modules
>>> pywikibot.Site('en', 'wikipedia')._paraminfo._query_modules & pywikibot.Site('en', 'wikipedia')._paraminfo._action_modules

I think we should do it similar to how the API does it and the_site._paraminfo['query+tokens'] should be given explicitly, although for backwards compatibility we probably need the_site._paraminfo['action+tokens'] because we currently return the query module.

Event Timeline

XZise raised the priority of this task from to High.
XZise updated the task description. (Show Details)
XZise added a project: Pywikibot.
XZise added subscribers: XZise, jayvdb.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptMar 13 2015, 2:23 PM

Change 196642 had a related patch set uploaded (by XZise):
[FIX] ParamInfo: Support differing between modules

Change 196642 merged by jenkins-bot:
ParamInfo sub-module support

There is still further improvements necessary, but this specific problem has been resolved.

Change 385973 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Remove overlap warning

Change 385973 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Remove overlap warning