I have edited api.py
if login_result['login']['result'] == "Success": prefix = '' #login_result['login']['cookieprefix'] cookies =  #for key in ('Token', 'UserID', 'UserName'): for key in ('UserID', 'UserName'): cookies.append("%s%s=%s" % (prefix, key, login_result['login']['lg' + key.lower()]
I just left prefix as a blank string and removed 'Token' from the 'key' loop, and it seems to work. I can do editions, at least.
I don't know anything about the inner workings of pywikibot, so it may be breaking something else. Just to let you know.