Skip to content

Commit

Permalink
Announce support of MediaWiki < 1.23 is to be dropped
Browse files Browse the repository at this point in the history
Bug: T378984
Change-Id: Iae91bac7fd2f01f625afee06b1e814f4fbf674d0
  • Loading branch information
xqt committed Nov 8, 2024
1 parent a342286 commit 4437d70
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pywikibot/site/_apisite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 4437d70

Please sign in to comment.