pypy/interpreter/baseobjspace.py
The last method in that chain, space.getbuiltinmodule, has a parameter force_init, which defaults to False. If you pass it as true, we avoid the (rpython equivalent to) sys.modules.get(module_name) code, getting the module object and successfully calling init() on it. (The failing test needs reload() to invoke module.init())
In the commit pasted above, I changed init_builtin to call space.getbuiltinmodule with force_init=True. This fixes reload, but I would think that this would be wrong for nonreload scenarios. (I've checked the py3k branch, which has this test (which passes locally), and it passes force_init=True if the finder's modtype is C_BUILTIN) However, I don't see a good way to conditionalize the passing of force_init. Does anyone have any suggestions as to how to handle this issue? (Given what I've found in py3k's code, is my change actually a valid fix?)
If anyone has time to reply, feel free to just ping me in irc if I'm on.
Thanks