commit phase of the session, which without it could cause
a "dictionary changed size during iter" error if garbage collection
interacted within the process. Change was introduced by
.. changelog::
:version: 1.0.0b5
+ .. change::
+ :tags: bug, orm
+
+ Added a list() call around a weak dictionary used within the
+ commit phase of the session, which without it could cause
+ a "dictionary changed size during iter" error if garbage collection
+ interacted within the process. Change was introduced by
+ #3139.
+
.. change::
:tags: bug, postgresql
:tickets: 3343
if not self.nested and self.session.expire_on_commit:
for s in self.session.identity_map.all_states():
s._expire(s.dict, self.session.identity_map._modified)
- for s in self._deleted:
+ for s in list(self._deleted):
s._detach()
self._deleted.clear()
elif self.nested: