PR #1194 broke the logic to compile apps. It caused compiled views to always be cached but would not detect when an upstream view was modified.
Example index.html extends layout.html. index.html.pyc would be be cached so any change in layout.html would not cause recompilation.
I reverted it partially. I restored the logic to support views.default.index.html.pyc instead of views_default_index_html.pyc which means newly compiled web2py apps work but not older ones. we cannot have it both ways.
In the version in master now we have:
global __builtins__
if is_jython: # jython hack
__builtins__ = mybuiltin()
elif is_pypy: # apply the same hack to pypy too
__builtins__ = mybuiltin()
elif PY2:
__builtins__['__import__'] = builtin.__import__ # WHY?
The PR that was reverted had changed it. I am not sure which one is the correct one because I never tested PyPy nor Jython (and I do not think care about Jython).
If you know better and have tested the changes can you explain this logic and perhaps make another PR to fix any problem?
Massimo