Hey Michael, Cool that you managed to reproduce the issue.
Michael Bayer wrote: > and a potential fix is this: > > Index: lib/sqlalchemy/orm/session.py > =================================================================== > --- lib/sqlalchemy/orm/session.py (revision 6289) > +++ lib/sqlalchemy/orm/session.py (working copy) > @@ -1018,7 +1018,7 @@ > state.key = instance_key > elif state.key != instance_key: > # primary key switch > - self.identity_map.remove(state) > + self.identity_map.discard(state) > state.key = instance_key > > self.identity_map.replace(state) > Index: MANIFEST.in > =================================================================== > > I guess the unit test for this would be, to do the operation in both ways > so that the issue is indicated regardless of dictionary ordering. Yes, that seems like it would catch it. Anything I can do to make sure that a fix is in a 0.5.x release soon? I could look into writing the unit test that demonstrates the problem; would I do this on trunk? Regards, Martijn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
