New submission from Jens Vagelpohl :
The following code in py_compile.compile fails (tested on 3.6.6 and 3.7.3) with
tracebacks that end like the one shown at the bottom. There's an AttributeError
about importlib.utils.
"""
if cfile is None:
Jens Vagelpohl added the comment:
Thank you for the prompt reply.
It turns out this is not a bug in py_compile. Other code we use imports
importlib.util briefly for a quick check at module level and then deletes it,
also at module scope. Removing the deletion fixes the issue.
Thanks again