A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-January/019361.html below:

[Python-Dev] Change in unpickle order in 2.2?

[Python-Dev] Change in unpickle order in 2.2?Greg Ward gward@mems-exchange.org
Thu, 10 Jan 2002 13:04:52 -0500
I have an application (Grouch) that has to do a lot of trickery at
pickle-time and unpickle-time, and as a result it happens to be
sensitive to the order of unpickling.

(The reason for the pickle-time intervention is that Grouch stores type
objects in its data structure, and you can't pickle type objects.  So it
hangs on to a representive value of the type for pickling -- eg. for the
"integer" type, it keeps both IntType and 0 in memory, but only pickles
0, and uses type(0) to get IntType back at unpickle time.)

The reason that Grouch is sensitive to the order of unpickling is
because its data structure is a gnarly, incestuous knot of mutually
interdependent classes, and I stopped tinkering with the pickle code as
soon as I got something that worked with Python 2.0 and 2.1.  Now it
fails under 2.2.  Under 2.1, it appears that certain more-deeply nested
objects were unpickled first; under 2.2, that is no longer the case, and
that screws up Grouch's test suite.

Anyone got a vague, hand-waving explanation for my vague, hand-waving
complaint?  Or should I try to come up with a test case?

Thanks --

        Greg
-- 
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange                            http://www.mems-exchange.org



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4