jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/572712 )
Change subject: [note] Show a FutureWarning about desupport of mw < 1.19 ......................................................................
[note] Show a FutureWarning about desupport of mw < 1.19
Change-Id: Ib7da01314c9bb0843d7300269404e693e5cf96be --- M HISTORY.rst M pywikibot/site.py 2 files changed, 11 insertions(+), 0 deletions(-)
Approvals: Dvorapa: Looks good to me, but someone else must approve Zoranzoki21: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst index 5898f37..af1379e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ Current release ---------------
+* Support of MediaWiki releases below 1.19 will be dropped (T245350) * compat module is deprecated for 5 years and will be removed with next release (T183085) * ipaddress module is required for Python 2 (T243171) * tools.ip will be dropped in favour of tools.is_IP (T243171) diff --git a/pywikibot/site.py b/pywikibot/site.py index ccc026b..c629eb5 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2751,6 +2751,16 @@ pywikibot.exception('You have no API read permissions. Seems ' 'you are not logged in') version = self.family.version(self.code) + + if MediaWikiVersion(version) < MediaWikiVersion('1.19'): + warn('\n' + + fill('Support of MediaWiki {version} will be dropped. ' + 'It is recommended to use MediaWiki 1.19 or above. ' + 'You may use Pywikibot stable release 3.0.20200111 ' + 'for older MediaWiki versions. ' + 'See T245350 for further information.' + .format(version=version)), FutureWarning) + return version
@property
pywikibot-commits@lists.wikimedia.org