diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-04-09 17:38:53 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-04-09 21:13:56 -0400 |
commit | 21099479daf98dca84cb97e928951ea0c486b479 (patch) | |
tree | 67e6fcd1da61577cc339eab8d0bb1133483b07cf /test/dialect/mssql/test_compiler.py | |
parent | 1ec2f7cfd6c1fa8acf9a41330df597af99dcadc7 (diff) | |
download | sqlalchemy-21099479daf98dca84cb97e928951ea0c486b479.tar.gz |
Add __reduce_ex__ to MutableList; add compat for older pickles
Fixed bug where using ``copy.copy()`` or ``copy.deepcopy()`` on
:class:`.MutableList` would cause the items within the list to be
duplicated, due to an inconsistency in how Python pickle and copy both make
use of ``__getstate__()`` and ``__setstate__()`` regarding lists. In order
to resolve, a ``__reduce_ex__`` method had to be added to
:class:`.MutableList`. In order to maintain backwards compatibility with
existing pickles based on ``__getstate__()``, the ``__setstate__()`` method
remains as well; the test suite asserts that pickles made against the old
version of the class can still be deserialized by the pickle module.
Also modified sqlalchemy.testing.util.picklers to return picklers all the way through
pickle.HIGHEST_PROTOCOL.
Fixes: #4603
Change-Id: I7f78b9cfb89d59a706248536c553dc5e1d987b88
Diffstat (limited to 'test/dialect/mssql/test_compiler.py')
0 files changed, 0 insertions, 0 deletions