Page MenuHomePhabricator

API paraminfo mustbeposted is not v1.14 compatible
Closed, DeclinedPublic

Description

v1.14 Paraminfo does not include mustbeposted

FAIL: Test attributes method.
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../tests/api_tests.py", line 406, in test_attributes
    self.assertIn('edit', attributes)
AssertionError: u'edit' not found in {}
-------------------- >> begin captured logging << --------------------
pywiki.wiki: DEBUG: Instantiated APISite object 'anarchopedia:en'
pywiki.data.api: DEBUG: CachedRequest: cache hit (.../tests/apicache-py2/81fd9e4d8a0f1dd5f5942db6d462471b71bbb015fe9adffe87bc4cd1b8bb8d55) for API request: APISite("en", "anarchopedia")LoginStatus(NOT_LOGGED_IN)[('action', 'help'), ('format', 'json'), ('maxlag', '5')]
pywiki.data.api: DEBUG: CachedRequest: cache hit (.../tests/apicache-py2/2269e684c048e77f09dc8dca0aa32eb100d14d0e60074e3c32fff85be506665f) for API request: APISite("en", "anarchopedia")LoginStatus(NOT_LOGGED_IN)[('action', 'paraminfo'), ('format', 'json'), ('maxlag', '5'), ('modules', 'paraminfo|query'), ('querymodules', '')]
pywiki.data.api: DEBUG: CachedRequest: cache hit (.../tests/apicache-py2/6d2f91a0447fb043fa0e8cf6fb14f6c7b9e7314ce2ee12120a218c079df32ba9) for API request: APISite("en", "anarchopedia")LoginStatus(NOT_LOGGED_IN)[('action', 'paraminfo'), ('format', 'json'), ('maxlag', '5'), ('modules', 'block|delete|edit|emailuser|expandtemplates|feedwatchlist|help|login|logout|move|opensearch|parse|patrol|protect|purge|rollback|unblock|undelete|watch'), ('querymodules', '')]
pywiki.data.api: DEBUG: CachedRequest: cache hit (.../tests/apicache-py2/fee1fa5fe51657ce5e98e80cd66f75dbcdfc3fa646263f53780923e24e2b593f) for API request: APISite("en", "anarchopedia")LoginStatus(NOT_LOGGED_IN)[('action', 'paraminfo'), ('format', 'json'), ('maxlag', '5'), ('modules', ''), ('querymodules', 'allcategories|allimages|alllinks|allmessages|allpages|allusers|backlinks|blocks|categories|categoryinfo|categorymembers|deletedrevs|duplicatefiles|embeddedin|extlinks|exturlusage|globalblocks|imageinfo|images|imageusage|info|langlinks|links|logevents|random|recentchanges|revisions|search|siteinfo|templates|usercontribs|userinfo|users|watchlist|watchlistraw')]

This is problematic as api.Request depends on this for the use_get flag

use_get = all(['mustbeposted' not in self.site._paraminfo[mod]
               for mod in modules])

Related Objects

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added projects: Pywikibot-tests, Pywikibot.
jayvdb subscribed.
Xqt triaged this task as Low priority.Feb 23 2019, 10:12 AM
Xqt subscribed.

won't fix due to T245350. MW 1.14 will be dropped.