Seppl2013 created this task.
Seppl2013 added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  To use pywikibot with a farm of wikis i try to set the login password via 
software. I am getting the password from an encrypted source.
  
  The line
  
    config2.authenticate[self.netloc] = (self.user,self.getPassword())
  
  didn't seem to have any effect in my adapter code so i started debugging the 
login process. It looks like LoginManager has a password field which is not 
used in site.php:
  
    class LoginManager(object):
    
        """Site login manager."""
    
        @deprecated_args(username='user', verbose=None)
        def __init__(self, password=None, sysop=False, site=None, user=None):
  
  
  
    login_manager = api.LoginManager(
                site=self, sysop=sysop, user=self._username[sysop])
  
  The login function in LoginManager does not have a password parameter at all. 
The current code structure makes it really awkward to supply a password via 
software.
  
    if not self.password:
                # First check that the username exists,
                # to avoid asking for a password that will not work.
                if not autocreate:
                    self.check_user_exists()
    
                # As we don't want the password to appear on the screen, we set
                # password = True
                self.password = pywikibot.input(
  
  It would be great if the logic would be changed to making a password 
available via api would be made simpler e.g. by having password=None as an 
optional parameter for login.

TASK DETAIL
  https://phabricator.wikimedia.org/T248471

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Seppl2013
Cc: Aklapper, Seppl2013, pywikibot-bugs-list, Zkhalido, Viztor, Wenyi, Tbscho, 
MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, 
Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to