From bce3ffc3412737eae51cfe2ba231c6d1366a7d16 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 23 Sep 2012 13:09:43 -0400 Subject: - use our new Cls.memoized_name._reset(self) method in place of all those __dict__.pop(), remove reset_memoized --- lib/sqlalchemy/orm/state.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/orm/state.py') diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py index 0f60c6712..9ef27f0d4 100644 --- a/lib/sqlalchemy/orm/state.py +++ b/lib/sqlalchemy/orm/state.py @@ -325,12 +325,12 @@ class InstanceState(interfaces._InspectionAttr): self.committed_state.clear() - self.__dict__.pop('_pending_mutations', None) + InstanceState._pending_mutations._reset(self) # clear out 'parents' collection. not # entirely clear how we can best determine # which to remove, or not. - self.__dict__.pop('parents', None) + InstanceState.parents._reset(self) for key in self.manager: impl = self.manager[key].impl @@ -502,7 +502,7 @@ class InstanceState(interfaces._InspectionAttr): for state, dict_ in iter: state.committed_state.clear() - state.__dict__.pop('_pending_mutations', None) + InstanceState._pending_mutations._reset(state) callables = state.callables for key in list(callables): -- cgit v1.2.1