API formatversion=2 (available as of mw 1.25) gives us good things like proper booleans. We like good things.
It may not be completely stable but we can selectively enable it for specific tasks.
API formatversion=2 (available as of mw 1.25) gives us good things like proper booleans. We like good things.
It may not be completely stable but we can selectively enable it for specific tasks.
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
pywikibot/core | master | +42 -5 | [IMPR] Use API formatversion 2 with userinfo |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | Release | None | T308258 Pywikibot 8 tasks (Tracking) | ||
Open | Feature | None | T121334 Selective use of formatversion=2 | ||
Resolved | Release | Xqt | T306637 Drop support for MediaWiki < 1.27 | ||
Open | None | T343204 Drop rawcontinue and continue query parameter |
First step is detecting whether it is available.
It will be most suitable where compatibility with old MediaWiki versions is not needed; otherwise we need code to support v1 responses and alternative code to support v2 responses, or some voodoo somewhere to make v1 look like v2.
Seems formatversion is not officially propagated. A lot of API documentation still describes the "old" format [1] or the new usage is not documented [2]. Is there any timeline for a switch?
To support formatversion 2 I propose to give up support of MediaWiki 1.23-1.26 and start support with the next LTS 1.27 (perhaps with Pywikibot 8)
[1] https://www.mediawiki.org/wiki/API:RecentChanges#Python for example
[2] https://www.mediawiki.org/wiki/API_talk:Revisions#Omissions_in_Documentation
Change 840161 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] [IMPR] Use API formatversion 2 with userinfo
Change 840161 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Use API formatversion 2 with userinfo