Message300711
In order to load and compile the module code, runpy calls the loader's get_code method. Because that happens outside of the normal import process, and PyImport_ImportModuleLevelObject is currently the only place where remove_importlib_frames is being invoked, tracebacks of exceptions occurring in get_code are kept unmodified.
Would it be wrong to drop all importlib frames from all unhandled exceptions, except when the -v flag is present? On the other hand, since the patch from #issue15486 seems to work fine in most scenarios, I propose removing both runpy and importlib traceback entries locally inside the runpy module. There may be better solutions, though...
In any case, I'm willing to write a patch. |
|
Date |
User |
Action |
Args |
2017-08-22 16:43:56 | vaultah | set | recipients:
+ vaultah, brett.cannon, ncoghlan, mattheww, ezio.melotti, Arfrever, eric.snow |
2017-08-22 16:43:56 | vaultah | set | messageid: <1503420236.05.0.892660993519.issue16217@psf.upfronthosting.co.za> |
2017-08-22 16:43:56 | vaultah | link | issue16217 messages |
2017-08-22 16:43:55 | vaultah | create | |
|