> -----Original Message-----
> From: [email protected] [mailto:stackless-
> [email protected]] On Behalf Of John Ehresman
> Sent: 23. október 2013 15:06
> To: [email protected]
> Subject: Re: [Stackless] Fwd: deepcopying (pickling) channels
> 
> It does look like the __init__ saves a reference of self.func2 in self.func 
> -- is
> this what triggers the pickling of globals?

Yes.  It is trying to pickle a bound function.
But it is not pickling "globals".  save_global() means that it is trying to 
save an object by name.  It came across wingdb_import_hook during the process, 
and this function is not found where it says it is found.
Now, where did it find the function?  We don't know.
If you change pickle.py we might have a better idea.

How about this:

def save(self, obj):
  try:
    return self._save(obj)
  except PickleError:
    print "pickling obj: %r", obj
    raise

def _save(self, obj):
  ... #rename old save to _save.


This should give us more info.

K


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to