jenkins-bot submitted this change.
[cleanup] deprecate sysop parameter with FutureWarning
Change-Id: Ie9a3f46cfab8cac4f84187df871c46e49d3484a6
---
M pywikibot/site/__init__.py
1 file changed, 6 insertions(+), 1 deletion(-)
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 change 652585. To unsubscribe, or for help writing mail filters, visit settings.