Re: [Python-Dev] Python 2.5.1c1 pickle problem

2007-04-16 Thread Neal Norwitz
On 4/12/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Ralf, your issue is arising because of revision 53655 which fixes SF 1615701. I have backed out this change for 2.5.1. > Am leaving this open for others to discuss and decide. The old behavior was > surprising to some, but the revised be

Re: [Python-Dev] Python 2.5.1c1 pickle problem

2007-04-15 Thread Ralf W. Grosse-Kunstleve
Hi Raymond, Thanks for the detailed explanation! > I'm not sure what your code was doing where the bugfix would cause > breakage. If its __getitem__() override returned a meaningful value > for each element in obj.keys(), then it should have worked fine. Of > course, if it was raising an except

Re: [Python-Dev] Python 2.5.1c1 pickle problem

2007-04-12 Thread Raymond Hettinger
Ralf, your issue is arising because of revision 53655 which fixes SF 1615701. Subclasses of builtins are pickled using obj.__reduce_ex__() which returns a tuple with a _reconstructor function and a tuple of arguments to that function. That tuple of arguments include the subclass name, the base cl

Re: [Python-Dev] Python 2.5.1c1 pickle problem

2007-04-11 Thread Raymond Hettinger
The pickle issue may be related to revision 53655 fixing a psuedo-bug (it was arguable whether current or prior behavior was most desirable). Will look at this more and will report back. Raymond ___ Python-Dev mailing list Python-Dev@python.org http:

[Python-Dev] Python 2.5.1c1 pickle problem

2007-04-11 Thread Ralf W. Grosse-Kunstleve
When pickling instances of an object derived from dict, the pickle in Python 2.5.1c1 calls the object's __getitem__() method. In contrast, earlier versions of Python incl. 2.5 don't call that method. Below is a minimal example with outputs. Is the difference in behavior an oversight or new featu