[Stackless] Fwd: deepcopying (pickling) channels

Kristján Valur Jónsson kristjan at ccpgames.com
Thu Oct 24 16:52:10 CEST 2013

> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless-
> bounces at stackless.com] On Behalf Of John Ehresman
> Sent: 23. október 2013 15:06
> To: stackless at stackless.com
> 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):
    return self._save(obj)
  except PickleError:
    print "pickling obj: %r", obj

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

This should give us more info.


More information about the Stackless mailing list