jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/652585 )
Change subject: [cleanup] deprecate sysop parameter with FutureWarning
......................................................................
[cleanup] deprecate sysop parameter with FutureWarning
Change-Id: Ie9a3f46cfab8cac4f84187df871c46e49d3484a6
---
M pywikibot/site/__init__.py
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index 6dd0947..127e828 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -260,7 +260,7 @@
auth_token = get_authentication(self.base_url(''))
return auth_token is not None and len(auth_token) == 4
- @deprecated_args(sysop=None)
+ @deprecated_args(sysop=True)
def login(self, sysop=None, autocreate=False):
"""
Log the user in if not already logged in.
@@ -273,6 +273,11 @@
by the site.
@see:
U{https://www.mediawiki.org/wiki/API:Login}
"""
+ if sysop is not None:
+ issue_deprecation_warning("'sysop' parameter",
+ warning_class=FutureWarning,
+ since='20201230')
+
# TODO: this should include an assert that loginstatus
# is not already IN_PROGRESS, however the
# login status may be left 'IN_PROGRESS' because
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/652585
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ie9a3f46cfab8cac4f84187df871c46e49d3484a6
Gerrit-Change-Number: 652585
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged