py3: avoid changing dictionary during iteration...
py3: avoid changing dictionary during iteration
dict.items() and friends are iterators/views in Python 3. You
aren't allowed to mutate the underlying dictionary when iterating
on these views. So iterate over a copy of things.
Differential Revision:
https://phab.mercurial-scm.org/D2164