diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-11-19 09:30:31 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-11-20 12:49:26 -0500 |
commit | 560044748a8ff5488769f8ebfa8a353a8d0115fa (patch) | |
tree | 43dc7c5f5127e263ce6b315a5c97f3daa96d5ec2 /lib/sqlalchemy/sql/crud.py | |
parent | 23b62c72ce436e32633f93c80a83db42bf5d60c7 (diff) | |
download | sqlalchemy-560044748a8ff5488769f8ebfa8a353a8d0115fa.tar.gz |
Skip on slice assignment to self
Fixed issue where when assigning a collection to itself as a slice, the
mutation operation would fail as it would first erase the assigned
collection inadvertently. As an assignment that does not change the
contents should not generate events, the operation is now a no-op. Note
that the fix only applies to Python 3; in Python 2, the ``__setitem__``
hook isn't called in this case; ``__setslice__`` is used instead which
recreates the list item-by-item in all cases.
Fixes: #4990
Change-Id: I08727880f70f4fe188de53a4dcd36746b62c7233
Diffstat (limited to 'lib/sqlalchemy/sql/crud.py')
0 files changed, 0 insertions, 0 deletions