John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/303367
Change subject: Stop reading 'cookieprefix' upon login ...................................................................... Stop reading 'cookieprefix' upon login We don't even use the cookies it tries to create, and cookieprefix is being removed from MediaWiki, so this entire hunk of code is useless, and has been removed. Bug: T142155 Change-Id: I449e75870fa2cbcb50a55c2b05805a2c084e6913 (cherry picked from commit 6a848594df261ed18ab78a5e406265ca27476cb0) --- M pywikibot/data/api.py 1 file changed, 7 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/67/303367/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index c2af5ea..44d7160 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2537,7 +2537,12 @@ Parameters are all ignored. - @return: cookie data if successful, None otherwise. + Note, this doesn't actually return or do anything with cookies. + The threadedhttp module takes care of all the cookie stuff, + this just has a legacy name for now and should be renamed in the + future. + + @return: empty string if successful, throws exception on failure """ if hasattr(self, '_waituntil'): @@ -2557,14 +2562,7 @@ if u"login" not in login_result: raise RuntimeError("API login response does not have 'login' key.") if login_result['login']['result'] == "Success": - prefix = login_result['login']['cookieprefix'] - cookies = [] - for key in ('Token', 'UserID', 'UserName'): - cookies.append("%s%s=%s" - % (prefix, key, - login_result['login']['lg' + key.lower()])) - self.username = login_result['login']['lgusername'] - return "\n".join(cookies) + return '' elif login_result['login']['result'] == "NeedToken": token = login_result['login']['token'] login_request["lgtoken"] = token -- To view, visit https://gerrit.wikimedia.org/r/303367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I449e75870fa2cbcb50a55c2b05805a2c084e6913 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits