diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-12-27 22:10:45 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-12-28 08:37:03 -0500 |
commit | 07cea66ccb74c68fa505b5fbba91984e0375993d (patch) | |
tree | 9b62f3292aa727763ccc326f000cefb9692adb63 /lib/sqlalchemy/sql/util.py | |
parent | ec5c9ebe6e7b8822de0c7bd19aea11ea2a582e29 (diff) | |
download | sqlalchemy-07cea66ccb74c68fa505b5fbba91984e0375993d.tar.gz |
Call __del() before remove()
The "remove" event for collections is now called before the item is removed
in the case of the ``collection.remove()`` method, as is consistent with the
behavior for most other forms of collection item removal (such as
``__delitem__``, replacement under ``__setitem__``). The ``pop()`` methods
are now the only exception as the target item is not available until after
the pop operation proceeds.
This allows ``remove()`` to be consistent in its behavior with all
the other collection operations, allows the "before_delete" hook
to be local to "pop()" operations only, and removes some method overhead.
We are also looking here to gain some more predictability in terms
of the fix for #1103.
Change-Id: I4fdea911517d65cc300fae0e9c351a471e52e4ab
Diffstat (limited to 'lib/sqlalchemy/sql/util.py')
0 files changed, 0 insertions, 0 deletions