Modules should be pickled by name. This is what happens during normal pickling by stackless. K
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of John Ehresman Sent: 25. október 2013 16:37 To: The Stackless Python Mailing List Subject: Re: [Stackless] Fwd: deepcopying (pickling) channels On 10/25/13 11:44 AM, Kristján Valur Jónsson wrote: > Did anyone attempt to patch pickle.py as suggested below, to diagnose the > pickling problem? > Once you arrive at a problem, it is useful to know the chain of objects it is > working with. Running in the debugger does break when the exception is raised. It's raised when pickling the module due to a dictionary returned from a reduce function in the copy_reg.dispatch_table for module objects. The reduce function is written in C (in Stackless/pickling/prickelpit.c) and gets the __import__ hook out of builtins. I can probably fix the pickle error (I've hacked a fix locally), but the questions I have are essentially why is the __import__ hook saved and how/when is it used? I worry that a fix for the pickling problem might lead to other, more obscure, problems later. Thanks, John _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
