[Stackless] Fwd: deepcopying (pickling) channels

John Ehresman jpe at wingware.com
Wed Oct 23 17:06:02 CEST 2013

On 10/23/13 6:00 AM, stackless-request at stackless.com wrote:
> From: Christian Tismer<tismer at stackless.com>
> well, this is something for WingWare. Or you can work around it.
> When certain things happen, like pickling, the Wind IDE needs to
> return the original objects, by either releasing its hooks, or
> by pretending they do. No idea how difficult that is.

This may be, but what I don't understand is that the example provided 
pickles an instance of a class.  The traceback indicates that the module 
global dictionary is also being pickled and this fails because there is 
an import hook that is calls into the debugger.  It seems odd to me to 
pickle the globals in this case -- my expectation is when the instance 
was unpickled code would refer to the current globals, not a copy of the 
globals from when the instance was pickled.

It does look like the __init__ saves a reference of self.func2 in 
self.func -- is this what triggers the pickling of globals?

Is there any mechanism for excluding values from a pickle?  The import 
hook and other debugger callbacks probably should not be pickled. 
Pickles created when the debugger is running should be unpicklable when 
it is not running and vice versa.



More information about the Stackless mailing list