This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients amaury.forgeotdarc, brett.cannon, eric.snow, georg.brandl, ncoghlan, pitrou
Date 2012-07-29.09:46:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343555177.26.0.443211386115.issue15425@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, it turns out the three problem children are those which accept an "import_" callback, which is set to builtins.__import__ when accessed via the import statement. This means we end up making a *recursive* call to PyImport_ImportModuleLevelObject, which calls remove_importlib_frames. The inner section of the trace gets stripped away, thus the "_exec_module" frame is already gone by the time the outer frames get added to the traceback.

For the moment, I'm just going to adopt the blunt instrument approach and special case those three functions (including them in the "always strip" category). If anyone else comes up with a more elegant mechanism to deal with the recursion, we can switch to it later.
History
Date User Action Args
2012-07-29 09:46:17ncoghlansetrecipients: + ncoghlan, brett.cannon, georg.brandl, amaury.forgeotdarc, pitrou, eric.snow
2012-07-29 09:46:17ncoghlansetmessageid: <1343555177.26.0.443211386115.issue15425@psf.upfronthosting.co.za>
2012-07-29 09:46:16ncoghlanlinkissue15425 messages
2012-07-29 09:46:16ncoghlancreate