Xqt submitted this change.

View Change


Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[IMPR] remove hints for MediaWiki < 1.27

Bug: T306637
Change-Id: I403f3a3cd245d7f3775b99799e93ec39efe0e314
---
M pywikibot/login.py
M pywikibot/site/_generators.py
2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/pywikibot/login.py b/pywikibot/login.py
index 54c57ee..b808ce1 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -464,7 +464,7 @@

@deprecated("site.tokens['login']", since='8.0.0')
def get_login_token(self) -> Optional[str]:
- """Fetch login token for MediaWiki 1.27+.
+ """Fetch login token.

.. deprecated:: 8.0

diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py
index 50b6089..b9fa2b8 100644
--- a/pywikibot/site/_generators.py
+++ b/pywikibot/site/_generators.py
@@ -1709,7 +1709,7 @@
'ususers': usernames, 'usprop': usprop})
return usgen

- def randompages(self, total=None, namespaces=None,
+ def randompages(self, total: Optional[int] = None, namespaces=None,
redirects: Optional[bool] = False, content: bool = False):
"""Iterate a number of random pages.

@@ -1723,11 +1723,11 @@
:type namespaces: iterable of str or Namespace key,
or a single instance of those types. May be a '|' separated
list of namespace identifiers.
- :param redirects: if True, include only redirect pages in results,
- False does not include redirects and None (MW 1.26+) include both
- types. (default: False)
- :param content: if True, load the current content of each iterated page
- (default False)
+ :param redirects: if True, include only redirect pages in
+ results, False does not include redirects and None include
+ both types (default: False).
+ :param content: if True, load the current content of each
+ iterated page (default False).
:raises KeyError: a namespace identifier was not resolved
:raises TypeError: a namespace identifier has an inappropriate
type such as NoneType or bool

To view, visit change 952531. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I403f3a3cd245d7f3775b99799e93ec39efe0e314
Gerrit-Change-Number: 952531
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged