Brett Cannon added the comment: I am running the test suite now using the "secret" attribute on ImportError. I tried to pass a flag, but locking became a bit messy/complicated. And I also realized that if I didn't do this then using different implementation of import_ in importlib wouldn't work because I would be hard-coding in what import implementation was used which would bypass the accelerated code in import.c. Plus with the compatibility issues I have had in the passed, I didn't want to skip a step of import that someone was probably relying on.
Once Python 3.4 comes out I will create a new exception that is raised when no module is found and catch that class specifically to avoid this hack. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15316> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com