On Wed, 19 Oct 2011 10:43:21 -0400 Itamar Turner-Trauring <itamar@itamarst.org> wrote:
On Wed, 2011-10-19 at 15:49 +0200, Antoine Pitrou wrote:
This is also the decision taken in the standard pickle module: if you unpickle a 2.x pickle containing str objects, you get 3.x str objects (not bytes).
That decision is wrong. It's corrupting users' data, though arguably it's your own fault if you actually rely on pickle.
No matter how you decide to handle the transition, there will be incompatibilities when transitioning between different data models. Relying on a pickle is no different than relying on a JSON tree, an AMP box or anything else. Mapping the natural 2.x string type to the natural 3.x string type was a reasonable decision in that context. Regards Antoine.