diff options
| author | Pieter Mulder <pmulder@proigia.nl> | 2016-06-29 11:15:44 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-06-29 17:21:31 -0400 |
| commit | fcfff77128174fe5f5e82d2897c5c76df308c8ed (patch) | |
| tree | 39d957baba905e82344c6b6f58ead4408a39838f /lib/sqlalchemy | |
| parent | 7c74d702a9632a8c7264d6972e46985de3fb2487 (diff) | |
| download | sqlalchemy-fcfff77128174fe5f5e82d2897c5c76df308c8ed.tar.gz | |
Repair pickling for Properties object
Fixed bug whereby the ``__getstate__`` / ``__setstate__``
methods for sqlalchemy.util.Properties were
non-working due to the transition in the 1.0 series to ``__slots__``.
The issue potentially impacted some third-party applications.
Pull request courtesy Pieter Mulder.
Fixes: #3728
Change-Id: I01ebd425bbfe145747fea2edd0d2d412c74fd84d
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/286
(cherry picked from commit cab57e9bab04fbdea44690c08dff379a29eaab32)
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/util/_collections.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/util/_collections.py b/lib/sqlalchemy/util/_collections.py index c29b81f6a..be5d1be44 100644 --- a/lib/sqlalchemy/util/_collections.py +++ b/lib/sqlalchemy/util/_collections.py @@ -200,10 +200,10 @@ class Properties(object): self._data[key] = obj def __getstate__(self): - return {'_data': self.__dict__['_data']} + return {'_data': self._data} def __setstate__(self, state): - self.__dict__['_data'] = state['_data'] + object.__setattr__(self, '_data', state['_data']) def __getattr__(self, key): try: |
