STINNER Victor added the comment: I will reply to my own question: in fact, ImportError is more convenient. The "try/except ImportError" pattern is common, in some cases, it's acceptable to skip a whole module. For a direct example on import during Python shutdown, see the issue #21925: "ResourceWarning sometimes doesn't display" which adds "try/except ImportError" to be able to log warnings.
@Brett, Eric: So, do you like importlib_shutdown-2.patch? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26637> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com