Hi group

In gluon/compileapp.py, around line 240, this line:

    __builtins__['__import__'] = __builtin__.__import__

is causing problems with pypy, seemingly all of a sudden.  I haven't 
backtracked to see which version it was still working in, but the weird 
thing is that when web2py is started with "python web2py.py" (2.7) then 
"print type(__builtins__)" says "dict" (but only in certain units??), but 
starting with "pypy web2py.py" then "print type(__builtins__)" says 
"module".   "module" is obviously correct, and I don't know how it becomes a 
dict in the context of compileapp.py. 

Has anyone a quick hint to solve this puzzle for me, before I try to figure 
this out in more detail?  Is anything special about what happens to 
__builtins__?  For one thing, if __builtins__ really is of type "module", 
then it can't have dict-like key access, and that is the bit that fails when 
launching the code with pypy, but I can't seem to find anywhere in the code 
where anything special is done to a reference of __builtins__.

Reply via email to