[Stackless] Fwd: deepcopying (pickling) channels

lars van Gemerden lars at rational-it.com
Thu Oct 24 01:44:00 CEST 2013


Two things:

 - Just guessing: Is it something in copying the closure of self.func2 that
triggers the pickling of modules?
 - With 'any mechanism for excluding values from a pickle', do you mean
__getstate__/__reduce__?

The latter could probably provide a workaround, but also more
administration that would only be needed during debug runs.

Cheers, Lars


On Wed, Oct 23, 2013 at 5:06 PM, John Ehresman <jpe at wingware.com> wrote:

> On 10/23/13 6:00 AM, stackless-request at stackless.**com<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.
>
> Thanks,
>
> John
>
>
> ______________________________**_________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/**mailman/listinfo/stackless<http://www.stackless.com/mailman/listinfo/stackless>
>



-- 
====================================
Lars van Gemerden
lars at rational-it.com
+31 6 26 88 55 39
====================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20131024/b74b538f/attachment.html>


More information about the Stackless mailing list