Page MenuHomePhabricator

Drop support for MediaWiki < 1.27
Closed, ResolvedPublicRelease

Description

I propose to give up 1.23-1.26 MediaWiki support with Pywikibot 8 which perhaps comes at the end of this year, which also drops Python 3.5 due to T301908.

MW 1.23 is a LTS published 2014 but the life cycle ended in 2017 already. MW 1.24-1.26 had reached their life time in 2016-2017 too.

Advantages

  • The main advantage is to support MediaWiki API formatversion 2 (T121334) which is recommended [1]. The new format came with MW 1.25 but is not stable with 1.26. With formatversion 2 there are useful changes [2]. The general theme is that the ApiResult arrays now have more metadata especially for Wikibase items and the new format makes this easier to handle.
  • The following modules can be simplified if dropping old code [3]:
    • api
    • logentries
    • pages
    • revision
    • apisite
    • site generators
    • siteinfo
    • tokenwallet
  • Tests are always difficult for old MW versions. Dropping old code improves the code health as well as the maintability
  • Old code is still available with the given version tags. We also can provide an older release at https://pywikibot.toolforge.org like we do for python 2 support (maybe we can drop te later).

[1] https://www.mediawiki.org/wiki/API:Data_formats#JSON parameters
[2] https://www.mediawiki.org/wiki/API:JSON_version_2
[3] https://codesearch.wmcloud.org/pywikibot/?q=1%5C.2%5B3-7%5D&i=nope&files=&excludeFiles=&repos=

Event Timeline

Xqt triaged this task as Lowest priority.Apr 21 2022, 3:57 PM
Xqt changed the subtype of this task from "Task" to "Release".
Xqt raised the priority of this task from Lowest to Low.Apr 21 2022, 4:00 PM

Change 835198 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] Drop support for MediaWiki < 1.27

https://gerrit.wikimedia.org/r/835198

Change 840669 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [WIP] Refactor TokenWallet

https://gerrit.wikimedia.org/r/840669

Change 835198 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] Drop support for MediaWiki < 1.27

https://gerrit.wikimedia.org/r/835198

Change 840669 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] Refactor TokenWallet

https://gerrit.wikimedia.org/r/840669

Change 843941 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] cleanup Site.is_uploaddisabled()

https://gerrit.wikimedia.org/r/843941

Change 845037 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] remove pre mw 1.27 code in ParamInfo

https://gerrit.wikimedia.org/r/845037

Change 845862 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] cleanup Site.merge_history()

https://gerrit.wikimedia.org/r/845862

Change 845863 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] Cleanup MW version dependenc in Site.notifications

https://gerrit.wikimedia.org/r/845863

Change 845863 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] Cleanup MW version dependency in Site.notifications

https://gerrit.wikimedia.org/r/845863

Change 845862 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] cleanup Site.merge_history()

https://gerrit.wikimedia.org/r/845862

Change 843941 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] cleanup Site.is_uploaddisabled()

https://gerrit.wikimedia.org/r/843941

Xqt reopened this task as Open.
Xqt claimed this task.

Change 944181 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] remove "continue" parameter from siteinfo request

https://gerrit.wikimedia.org/r/944181

Change 944234 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] Remove mw_version check in api.Request._add_defaults

https://gerrit.wikimedia.org/r/944234

Change 944234 merged by Xqt:

[pywikibot/core@master] [cleanup] Remove mw_version check in api.Request._add_defaults

https://gerrit.wikimedia.org/r/944234

Change 947850 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Remove old code for mw < 1.27

https://gerrit.wikimedia.org/r/947850

Change 947850 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Remove old code for mw < 1.27

https://gerrit.wikimedia.org/r/947850

Change 952531 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] remove hints for MediaWiki < 1.27

https://gerrit.wikimedia.org/r/952531

Change 952531 merged by Xqt:

[pywikibot/core@master] [IMPR] remove hints for MediaWiki < 1.27

https://gerrit.wikimedia.org/r/952531

Change 845037 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] remove pre mw 1.27 code in ParamInfo

https://gerrit.wikimedia.org/r/845037