as outlined in T248471 the code
# needs patch as outlined in https://phabricator.wikimedia.org/T248471 #self.site.login(password=self.getPassword()) password=self.getPassword() lm = LoginManager(password=password, site=self.site, user=self.user) lm.login()
does not perform as intended. I get an error message i have replaced wiki lang and user with tags to hide the original message details:
Logging in to <wiki>:<lang> as <user> WARNING: API error readapidenied: You need read permission to use this module. WARNING: API error readapidenied: You need read permission to use this module. ERROR: APIError: readapienied: You need read permission to use this module. [help: See http://<wiki>.bitplan.com/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.] WARNING: API error readapiddenied: You need read permission to use this module. WARNING: API error readapidenied: You need read permission to use this module. WARNING: Could not check user <user> exists on <wiki>:<lang> Password for user <user> on <wiki>:<lang> (no characters will be shown): Warning: Password input may be echoed.
I'd expect that the API calls are not done but a straight login attempt. If API calls must be done and fail this should not lead to the password be forgotten. It shoul not be mandatory to check the user with a siteinfo call.
May be we need a parameter that forces this behavior to avoid this hard to debug situation.