jayvdb added a comment.
One workaround is to update `bot.handle_args` to load the Family defined by `config.family` and adjust `config.mylang` if it is a single site family. Then `BaseSite.__init__` doesnt need to update it. At least then the change to the global variable only occurs once, during the parsing of the command line options. However, some uses of the library do not call `bot.handle_args`, so a lower level initialisation hook would be better. Another workaround is to add more patchy code into `BaseSite.__init__` to also fix the `config.usernames` dict after it has updated `config.mylang`. TASK DETAIL https://phabricator.wikimedia.org/T130570 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: jayvdb Cc: Aklapper, jayvdb, pywikibot-bugs-list _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
