Re: Bug in cPickle with packages and 'object' inherited class

2007-07-29 Thread Gabriel Genellina
En Wed, 25 Jul 2007 17:32:46 -0300, Conrado PLG [EMAIL PROTECTED] escribió: Say you have this structure: pna/ __init__.py model.py __init__.py is empty. model.py is: import cPickle as pickle class A(object): pass def serialize(): pickle.dump(A(),

Re: A bug in cPickle?

2007-05-17 Thread Nick Craig-Wood
Victor Kryukov [EMAIL PROTECTED] wrote: The following behavior is completely unexpected. Is it a bug or a by- design feature? from pickle import dumps from cPickle import dumps as cdumps print dumps('1001799')==dumps(str(1001799)) print cdumps('1001799')==cdumps(str(1001799))

Re: A bug in cPickle?

2007-05-17 Thread Facundo Batista
Victor Kryukov wrote: The following behavior is completely unexpected. Is it a bug or a by- design feature? ... from pickle import dumps from cPickle import dumps as cdumps print dumps('1001799')==dumps(str(1001799)) print cdumps('1001799')==cdumps(str(1001799)) It's a feature, the

Re: A bug in cPickle?

2007-05-17 Thread Martin v. Löwis
This does seem odd, at the very least. The differences between the pn codes comes from this comment in cPickle.c: /* Make sure memo keys are positive! */ /* XXX Why? * XXX And does positive really mean non-negative? * XXX pickle.py starts with PUT index 0, not

A bug in cPickle?

2007-05-16 Thread Victor Kryukov
Hello list, The following behavior is completely unexpected. Is it a bug or a by- design feature? Regards, Victor. - from pickle import dumps from cPickle import dumps as cdumps print dumps('1001799')==dumps(str(1001799)) print cdumps('1001799')==cdumps(str(1001799)) output:

Re: A bug in cPickle?

2007-05-16 Thread Chris Cioffi
On 16 May 2007 10:06:20 -0700, Victor Kryukov [EMAIL PROTECTED] wrote: Hello list, The following behavior is completely unexpected. Is it a bug or a by- design feature? Regards, Victor. - from pickle import dumps from cPickle import dumps as cdumps print

Re: A bug in cPickle?

2007-05-16 Thread infidel
ActivePython 2.5.1.1 as well: PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information. from pickle import dumps from cPickle import dumps as cdumps print

need helping tracking down weird bug in cPickle

2006-06-20 Thread Carl J. Van Arsdall
Hey everyone, cPickle is raising an ImportError that I just don't quite understand. Before I paste the code, let me explain the application. Basically the part of the application that failed is a function that loads a list of objects from a file using cPickle. This list is a queue of

Re: need helping tracking down weird bug in cPickle

2006-06-20 Thread Scott David Daniels
Carl J. Van Arsdall wrote: Hey everyone, cPickle is raising an ImportError that I just don't quite understand. Before I paste the code, let me explain the application. Basically the part of the application that failed is a function that loads a list of objects from a file using

Re: need helping tracking down weird bug in cPickle

2006-06-20 Thread Tim Peters
[Carl J. Van Arsdall] Hey everyone, cPickle is raising an ImportError that I just don't quite understand. When that happens, the overwhelmingly most likely cause is that the set of modules on your PYTHONPATH has changed since the pickle was first created, in ways such that a module _referenced_