11 ms·
Pickle's greatest flaw is the complete lack of forward and backward compatibility. The compatibility is not guaranteed between when upgrading any of the depende
by edejong 6y ago
Pickle's greatest flaw is the complete lack of forward and backward compatibility. The compatibility is not guaranteed between when upgrading any of the dependencies. Dependencies should stay the same over releases, halting forward progress in the development process.
- nedbat 6y agoCan you elaborate? What dependencies? Pickle is in the standard library.
- price 6y agoPerhaps they're referring to your application's dependencies, in a situation where you're pickling instances of those dependencies' types. Then this is an example of "old pickles look like old code".
- johncearls 6y agoI have this problem a lot with pandas Dataframes. I know I could engineer around it, but most of the time I just want to distribute some number crunching to a bunch of docker images quickly and a database is overkill for a one off analysis. Works fine until an image updates pandas. Not taking issue with pandas or pickle, but it's an issue of time trade-off. JSON is okay, but object conversion/Nan/None/inf can be a bear.
- edejong 6y agoLibrary dependencies, such as managed by Conda or Pip (from PyPI). Any change in the expected interface from a dependency to your depickled objects will create an error. I author package "FooBar". FooBar creates objects of type "Baz" which will later be serialized by you, the FooBar user. Within the FooBar package: "def show(baz)" taking a Baz and displaying it. When I decide at one point to add an extra attribute to my "Baz" objects, I cannot (or should be extra careful) to use that attribute within that method if I expect the "Baz" objects to be pickled. This situation can be unpredictable and cause hard to track errors.