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

2019-04-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: No problem, closing the issue. -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[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 a

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

2019-04-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please add a simplified script to reproduce this and possibly without any external dependencies? Looking at the traceback it seems to come from the project chameleon at https://github.com/malthe/chameleon/blob/983877e628a75f42c473cb2ea2350f

[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: if optimize >= 0: optimizat