jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/657989 )
Change subject: [6.0] drop support for mw 1.19-1.22 in pywikibot.page ......................................................................
[6.0] drop support for mw 1.19-1.22 in pywikibot.page
Bug: T268979 Change-Id: I52c253f1cede0299e772c3e79ea8e329a11bcf2d --- M pywikibot/page/__init__.py M pywikibot/page/_revision.py 2 files changed, 1 insertion(+), 5 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py index a803780..70b165d 100644 --- a/pywikibot/page/__init__.py +++ b/pywikibot/page/__init__.py @@ -44,7 +44,7 @@ ) from pywikibot.family import Family from pywikibot.page._revision import Revision -from pywikibot.site import DataSite, Namespace, need_version +from pywikibot.site import DataSite, Namespace from pywikibot.tools import ( add_full_name, compute_file_hash, @@ -257,7 +257,6 @@ If it cannot be reliably determined via the API, None is returned. """ - # TODO: T102735: Add a sane default of 'wikitext' and others for <1.21 if not hasattr(self, '_contentmodel'): self.site.loadpageinfo(self) return self._contentmodel @@ -1576,7 +1575,6 @@ return None return list(self._coords)
- @need_version('1.20') def page_image(self): """ Return the most appropriate image on the page. diff --git a/pywikibot/page/_revision.py b/pywikibot/page/_revision.py index 46913f5..32436b2 100644 --- a/pywikibot/page/_revision.py +++ b/pywikibot/page/_revision.py @@ -122,7 +122,5 @@ this returns the content model of the main slot.
@return: content model - @raises AssertionError: content model not supplied to the constructor - which always occurs for MediaWiki versions lower than 1.21. """ return self.contentmodel