Last modified: 2014-09-18 08:20:14 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/patches/621/ Reported by: gallaecio Created on: 2013-08-03 20:30:54.056000 Subject: When loging in to a site, try the site-configured username if any Original description:
Created attachment 13369 [details] Copy of attachment from http://sourceforge.net/p/pywikipediabot/patches/621/attachment/login-site-username.diff
[No attachment in Gerrit, hence resetting status and adding keyword. See https://bugzilla.wikimedia.org/describekeywords.cgi and https://www.mediawiki.org/wiki/Bug_management/Bug_report_life_cycle for more information.]
The patch does not appear to solve anything: site.userinfo holds information about the currently logged-in user.
The is an interesting approach which I am guessing solves part of the 'SUL' problem. Instead of having to add usernames['wikipedia']['*'] = '..'; usernames['wikisource']['*'] = '..'; to user-config.py etc etc for every family in the matrix of the global account. If a account is logged into it.wp using an entry in user-config.py, and the bot visits en.wikipedia, the bot *is* logged in, as they have a unified account, and the cookie logs them in, and api.py automatically populates userinfo with the username. That works wonderfully, and doesnt need this patch. I am guessing this patch is about when there is a 'problem' with the existing login, which might be because of site.py tripping over itself (the login code is a mess), or maybe the server asking the account to login again. If the password_file contains simple two-part matching entry for the username in siteinfo, the re-login will be automatic. i.e. (bot_username, bot_password) ; not (family, username, password) or other options. I would like to hear more about how this patch helps, but it does appear useful in limited but crucial circumstances.