3 ms·
I noticed some changes to pickle; do people still use pickle for Real Work? Potential vulnerabilities aside, I got bitten by some migration issue back in the 2
by philsnow 7y ago
I noticed some changes to pickle; do people still use pickle for Real Work?
Potential vulnerabilities aside, I got bitten by some migration issue back in the 2.2 to 2.4 transition where some built-in types changed how they did their __setstate__ and __getstate__ (iirc) and that caused objects picked under 2.4 to not unpickle correctly under 2.2 or something like that. After that I never wanted to use pickle in production again.
- brilee 7y agoPickle is only guaranteed to work within python versions and shouldn't be used as a long-term data storage strategy. It's really intended for quick-n-dirty serialization, or for multiprocessing communication, where the objects are ephemeral.