micropython/micropython — pull request #903 by dpgeorge (2014-10-12 10:50:37+00:00)
Title: Add module weak-ref support.

With this patch a port can enable module weak-ref support and provide a
dict of qstr->module mapping. This mapping is looked up only if an
import fails to find the requested module in the filesystem.

This allows to have the builtin module named, eg, usocket, and provide
a weak-ref of "socket" to the same module, but this weak-ref can be
overridden if a file by the name "socket.py" is found in the import
path.