If a receiver function called by eventmanager wants to add or remove connections to other events, this would change the
receivers dictionary while iterating it. This may cause subtle bugs (some receivers would not get called for no aparent reason).
for rec in receivers:
if rec.receiver(*params, **keyargs): # if receiver calls eventmanager.connect() or .disconnect(), this would change the receivers dictionary
The fix was to iterate over a copy of the dictionary:
for rec in copy(receivers):