Trying to better understand the issue of T183466, I create a temporary account ([[ https://meta.wikimedia.org/wiki/Special:CentralAuth/Test20180327 | Test20180327 ]]) on enwiki, and tried `Site(code, 'wikipedia').login()` (without `autocreate`) several times on different wikis. The account was created automatically every time.
Then I noticed that [[ https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/pywikibot/login.py;188dc64542bf54d4a9510be6160ed8665fc6ef45$297 | the parameter is only respected if the password is not saved in a password file ]].
Users who have a password file will have an account created for them regardless of the value of `autocreate`.
This difference in behaviour is unexpected. We either want the accounts to be auto-created by default or we don't, it should not depend on password file.
IMO, we should always have accounts auto-created if possible.
Related commits:
c1b712702be6a3efa5f2b6a9eac37d34f2135277
b96e4c8e3153e0a0576d7dab184853ea53adc7dc