[issue36633] py_compile.compile: AttributeError on importlib.utils

2019-04-15 Thread Jens Vagelpohl
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:

[issue36633] py_compile.compile: AttributeError on importlib.utils

2019-04-15 Thread Jens Vagelpohl
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