diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py index 81c3a85e5a..3802d23b29 100644 --- a/pywikibot/site/_apisite.py +++ b/pywikibot/site/_apisite.py @@ -1246,6 +1246,14 @@ def version(self) -> str: pywikibot.error(msg) raise + if MediaWikiVersion(version) < '1.31': + warn('\n' + + fill(f'Support of MediaWiki {version} will be dropped. ' + 'It is recommended to use MediaWiki 1.31 or above. ' + 'You may use every Pywikibot 9.X for older MediaWiki ' + 'versions. See T378984 for further information.'), + FutureWarning) + if MediaWikiVersion(version) < '1.27': raise RuntimeError(f'Pywikibot "{pywikibot.__version__}" does not ' f'support MediaWiki "{version}".\n'