Hello!
We found bug in SA version `1.4.38` during deserialization.
How to reproduce:

Serialize any ORM object with pickle using environment with any SA 
compatible version `1.4.n` except `1.4.38` in , ex. `1.4.31`:

```
pickle.dumps(obj)
```

Deserialize result using environment with SA version == `1.4.38`:

```
obj_loaded = pickle.loads(b'\x...
```
Got: 
```
Traceback (most recent call last):
File "/home/user/anaconda3/envs/python375/lib/python3.7/code.py", line 90, 
in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File 
"/home/user/anaconda3/envs/python375/lib/python3.7/site-packages/sqlalchemy/orm/state.py",
 
line 577, in __setstate__
state_dict["manager"](self, inst, state_dict)
File 
"/home/user/anaconda3/envs/python375/lib/python3.7/site-packages/sqlalchemy/orm/instrumentation.py",
 
line 506, in __call__
manager.dispatch.unpickle(state, state_dict)
File 
"/home/user/anaconda3/envs/python375/lib/python3.7/site-packages/sqlalchemy/event/attr.py",
 
line 343, in __call__
fn(*args, **kw)
File 
"/home/user/anaconda3/envs/python375/lib/python3.7/site-packages/sqlalchemy/ext/mutable.py",
 
line 505, in unpickle
for val in state_dict["ext.mutable.values"][key]:
TypeError: list indices must be integers or slices, not str
```

Seems that backward compatibility is lost.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/f1ef4019-5ce4-4d14-938e-7a58f17db807n%40googlegroups.com.

Reply via email to