"""prune unreferenced, non-dirty states."""
ref_count = len(self)
- dirty = [s.obj() for s in self.all_states() if s.check_modified()]
+ dirty = [s.obj() for s in self.all_states() if s.modified]
# work around http://bugs.python.org/issue6149
keepers = weakref.WeakValueDictionary()
def sort_key(self):
return self.key and self.key[1] or (self.insert_order, )
- def check_modified(self):
- # TODO: deprecate
- return self.modified
-
def initialize_instance(*mixed, **kwargs):
self, instance, args = mixed[0], mixed[1], mixed[2:]
manager = self.manager
x.element = ['one', 'two', 'three']
attributes.instance_state(x).commit_all(attributes.instance_dict(x))
x.element[1] = 'five'
- assert attributes.instance_state(x).check_modified()
+ assert attributes.instance_state(x).modified
attributes.unregister_class(Foo)
x.element = ['one', 'two', 'three']
attributes.instance_state(x).commit_all(attributes.instance_dict(x))
x.element[1] = 'five'
- assert not attributes.instance_state(x).check_modified()
+ assert not attributes.instance_state(x).modified
def test_descriptorattributes(self):
"""changeset: 1633 broke ability to use ORM to map classes with unusual