Last modified: 2014-10-18 09:00:34 UTC
(Cloned from bug 55068 comment 10) pywikbot api.py has a hard-coded list of 'write' actions, which cause it to assert the user is logged in. This should be converted to a detection algorithm (using API action paraminfo)
Ideally, a persistent cache should be set up to remember the 'paraminfo' data. For example, the "writerights" property would enable assertion, while "tokentype" would help guessing the required token type automatically. E.g.: https://www.mediawiki.org/w/api.php?action=paraminfo&modules=thank