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 <[email protected]> wrote:

> On 10/23/13 6:00 AM, 
> stackless-request@stackless.**com<[email protected]>wrote:
>
>> From: Christian Tismer<[email protected]>
>>
>>
>> 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
> [email protected]
> http://www.stackless.com/**mailman/listinfo/stackless<http://www.stackless.com/mailman/listinfo/stackless>
>



-- 
====================================
Lars van Gemerden
[email protected]
+31 6 26 88 55 39
====================================
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to