diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-01-10 15:27:33 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-01-10 15:27:33 -0500 |
| commit | 4332b970c9ec0b32170b1206b965fa7eb5d62a3f (patch) | |
| tree | 3172990f66d1989b1ab0062cef9ad8f0428e5b88 /lib/sqlalchemy | |
| parent | cdd090b11e14b7e1b33a3f836809093ffa99209b (diff) | |
| download | sqlalchemy-4332b970c9ec0b32170b1206b965fa7eb5d62a3f.tar.gz | |
Set up of_type variable for legacy loader option deserialize
Fixed regression where pickle format of a Load / _UnboundLoad object (e.g.
loader options) changed and ``__setstate__()`` was raising an
UnboundLocalError for an object received from the legacy format, even
though an attempt was made to do so. tests are now added to ensure this
works.
Change-Id: Idccf643e010776817dd32512facdefa263188814
Fixes: #4159
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/strategy_options.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 13c510047..1963e5843 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -449,6 +449,7 @@ class _UnboundLoad(Load): if len(key) == 2: # support legacy cls, propkey = key + of_type = None else: cls, propkey, of_type = key prop = getattr(cls, propkey) |
