> The primary reason is that I have some legacy code that uses
> __builtins__ that I would rather not
> have to rewrite. It's an application maintain by another party and I
> don't want to have to continually
> sync with their copy.
> In addition, there are some neat things you can do, like dynamically
> being able to re-define the behavior of builtin functions and add new
> The patch seems to be sound, and I don't understand why it's hitting
> those null frames in the current CVS, so any ideas would be appreciated.
If the goals are those stated above the patch seems far from complete or correct.
See CPython (as starting point):
and compare with:
and where PyFrames are created and module execution code (in org.python.core.Py and imp)
Both the place PyModule and the approach (__import__) are probably wrong.
That's just the result of a quick survey of Jython and CPython code (it's not the whole picture).
OTOH python __builtins__ is related to restricted execution, a thing that jython won't implement.
See Jython vs CPython in the doc.
The problem with the null frames is different, that should be solved anyway.
regards, Samuele Pedroni.