Message6188
hmm, why is there no ability to re-open a bug? hopefully someone sees this comment...
I am getting an exception using 2.5.2b2 with this code. Specifically the cahnges to __builtin__.java where if the level is -1 (or < 0) it is not sending the full list of arguments to the import function. This may not cause problems with the built-in import but I am overriding the built-in __import__ function.
When the cPickle module is loaded, it calls importModule("copy_reg") and when this calls my import function I am missing the globals variable somehow because I get:
UnboundLocalError: local variable 'globals' referenced before assignment
Even though my import function is defined as:
def import_hook(name, globals=None, locals=None, fromlist=None, level= -1):
If I modify __builtins__.java to always pass the level argument I do not get this exception. |
|
Date |
User |
Action |
Args |
2010-10-18 23:11:16 | bpedman | set | messageid: <1287443476.04.0.719746643069.issue1648@psf.upfronthosting.co.za> |
2010-10-18 23:11:16 | bpedman | set | recipients:
+ bpedman, zyasoft, akruis |
2010-10-18 23:11:15 | bpedman | link | issue1648 messages |
2010-10-18 23:11:14 | bpedman | create | |
|