**Steps to replicate the issue**:
* Install/upgrade/downgrade to pywikibot 10.7.2 (current tip of branch `stable`) or 10.7.1
* Configure pywikibot using the instructions from https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords (`pywikibot/families/family_id_family.py`, `user-config.py`, etc)
* Use the following entry in the password file (generated using `Special:BotPasswords`, specifically `Special:BotPasswords/AndrybakBot` in this case):
```
('family_id', 'AndrybakBot', BotPassword('AndrybakBot', '11111111111111111111111111111111'))
```
* Ensure we're not using tokens from previous login:
```
python pwb.py login -logout
```
* Run:
```
python pwb.py login
```
**What happens?**:
After `python pwb.py login`
```
File "<redacted>/core_stable/pywikibot/login.py", line 291, in readPassword
entry = (entry[0], BotPassword(*entry[1]))
^^^^^^^^^^^^^^^^^^^^^^
TypeError: BotPassword.__init__() takes 3 positional arguments but 12 were given
CRITICAL: Exiting due to uncaught exception TypeError: BotPassword.__init__() takes 3 positional arguments but 12 were given
```
* I added some debug output to `pywikibot/login.py` just before the failing line, which gave me the following information:
* `entry[0]` is `family_id`, which is whatever
* but `entry[1]` is `AndrybakBot`, which is unexpected in the constructor of `BotPassword`
**What should have happened instead?**:
Successful logging in, something like:
```
Logging in to family_id:en as AndrybakBot@AndrybakBot
Logged in on family_id:en as AndrybakBot.
Execution time: 2 seconds
```
**Other information**
* I've successfully used this password file since May 2021 without changes, and noticed the failure after upgrading pywikibot.
* Cannot reproduce on version **10.7.0**.
* `git blame pywikibot/login.py` suggest that the root cause was the changes in T410753, commit [[ https://gerrit.wikimedia.org/g/pywikibot/core/+/fd7c23d76d5a1accfbc0f4575b83afa9fe55a8a9 | fd7c23d ]] (SEC: parse password lines as literals & update default PASS_BASENAME, 2025-11-22).