diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-08-28 17:43:46 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-09-02 17:55:15 -0400 |
commit | 108c60f460c723a0f48c47597928d938a3b0a42d (patch) | |
tree | faad446079cfacfe6aacec92900aa5d2bbfa70ac /test/orm/test_hasparent.py | |
parent | 8be93c23ee566de7cefd7d1b8ef044324132a70f (diff) | |
download | sqlalchemy-ticket_2677.tar.gz |
- The :class:`.SessionEvents` suite now includes events to allowticket_2677
unambiguous tracking of all object lifecycle state transitions
in terms of the :class:`.Session` itself, e.g. pending,
transient, persistent, detached. The state of the object
within each event is also defined.
fixes #2677
- Added a new session lifecycle state :term:`deleted`. This new state
represents an object that has been deleted from the :term:`persistent`
state and will move to the :term:`detached` state once the transaction
is committed. This resolves the long-standing issue that objects
which were deleted existed in a gray area between persistent and
detached. The :attr:`.InstanceState.persistent` accessor will
**no longer** report on a deleted object as persistent; the
:attr:`.InstanceState.deleted` accessor will instead be True for
these objects, until they become detached.
- The :paramref:`.Session.weak_identity_map` parameter is deprecated.
See the new recipe at :ref:`session_referencing_behavior` for
an event-based approach to maintaining strong identity map behavior.
references #3517
Diffstat (limited to 'test/orm/test_hasparent.py')
-rw-r--r-- | test/orm/test_hasparent.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/orm/test_hasparent.py b/test/orm/test_hasparent.py index fd246b527..df4b05980 100644 --- a/test/orm/test_hasparent.py +++ b/test/orm/test_hasparent.py @@ -116,7 +116,7 @@ class ParentRemovalTest(fixtures.MappedTest): User = self.classes.User s, u1, a1 = self._fixture() - s._expunge_state(attributes.instance_state(u1)) + s._expunge_states([attributes.instance_state(u1)]) del u1 gc_collect() @@ -178,7 +178,7 @@ class ParentRemovalTest(fixtures.MappedTest): u2 = User(addresses=[a1]) s.add(u2) s.flush() - s._expunge_state(attributes.instance_state(u2)) + s._expunge_states([attributes.instance_state(u2)]) del u2 gc_collect() |