Brett Cannon <br...@python.org> added the comment:
Should try to use __spec__ first, but if it isn't set then fall back on module_repr() and raise an ImportWarning. See Lib/importlib/_bootstrap.py:_module_repr. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42137> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com