summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/orm/identity.py2
-rw-r--r--lib/sqlalchemy/orm/state.py4
-rw-r--r--test/orm/test_attributes.py4
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/sqlalchemy/orm/identity.py b/lib/sqlalchemy/orm/identity.py
index 4c1618df9..69ca31eda 100644
--- a/lib/sqlalchemy/orm/identity.py
+++ b/lib/sqlalchemy/orm/identity.py
@@ -236,7 +236,7 @@ class StrongInstanceDict(IdentityMap):
"""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()
diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py
index 3e80b703f..8dd6bd309 100644
--- a/lib/sqlalchemy/orm/state.py
+++ b/lib/sqlalchemy/orm/state.py
@@ -68,10 +68,6 @@ class InstanceState(object):
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
diff --git a/test/orm/test_attributes.py b/test/orm/test_attributes.py
index c312b37aa..c69021aa3 100644
--- a/test/orm/test_attributes.py
+++ b/test/orm/test_attributes.py
@@ -573,7 +573,7 @@ class AttributesTest(_base.ORMTest):
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)
@@ -583,7 +583,7 @@ class AttributesTest(_base.ORMTest):
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