[Pywikipedia-bugs] [Maniphest] [Commented On] T253127: several scripts fails with RuntimeError('dictionary changed size during iteration')

2020-05-19 Thread Xqt
Xqt added a comment. This has to do with instantiating a Site: >>> import pwb, pywikibot >>> from pywikibot.config2 import usernames >>> for fam in usernames: for lang in usernames[fam]: pywikibot.Site(lang, fam) APISite("commons"

[Pywikipedia-bugs] [Maniphest] [Commented On] T253127: several scripts fails with RuntimeError('dictionary changed size during iteration')

2020-05-19 Thread Xqt
Xqt added a comment. The Problem is in line `1246 `inside `pywikibot.__init__.py`: `code_to_user = config.usernames['*'].copy()` usernames is a defaultdict. If '*' key is not in that dict this statement creates it and changes the usernames before the copy will be done. TASK DETA

[Pywikipedia-bugs] [Maniphest] [Commented On] T253127: several scripts fails with RuntimeError('dictionary changed size during iteration')

2020-05-19 Thread gerritbot
gerritbot added a comment. Change 597313 had a related patch set uploaded (by Xqt; owner: Xqt): [pywikibot/core@master] [bugfix] Do not change usernames when creating a Site https://gerrit.wikimedia.org/r/597313 TASK DETAIL https://phabricator.wikimedia.org/T253127 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T253127: several scripts fails with RuntimeError('dictionary changed size during iteration')

2020-05-19 Thread D3r1ck01
D3r1ck01 added a comment. In T253127#6149098 , @Xqt wrote: > The Problem is in line `1246 `inside `pywikibot.__init__.py`: > > `code_to_user = config.usernames['*'].copy()` > > usernames is a defaultdict. If '*' key is not in

[Pywikipedia-bugs] [Maniphest] [Commented On] T253127: several scripts fails with RuntimeError('dictionary changed size during iteration')

2020-05-19 Thread gerritbot
gerritbot added a comment. Change 597313 **merged** by jenkins-bot: [pywikibot/core@master] [bugfix] Do not change usernames when creating a Site https://gerrit.wikimedia.org/r/597313 TASK DETAIL https://phabricator.wikimedia.org/T253127 EMAIL PREFERENCES https://phabricator.wikime