Author ncoghlan
Recipients Arfrever, brett.cannon, eric.araujo, georg.brandl, ncoghlan
Date 2012-07-15.04:03:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
OK, the way I plan to tackle this is to actually redirect the pkgutil APIs to importlib (rather than using the private import emulation).

The reason I'm going to tackle it like this is that there are some assumptions pkgutil deals with that importlib doesn't. Specifically, runpy expects find_loader() to take care of importing the parent package. In addition, importlib is prone to throwing AttributeError or TypeError for problems where pkgutil consistently throws ImportError. By using pkgutil as a compatibility shim, most code (including runpy itself) will be able to transition to importlib without actually needing any changes.

This approach also brings test_runpy and test_cmd_line_script more fully to bear on the importlib implementation, which is a nice bonus :)
Date User Action Args
2012-07-15 04:03:03ncoghlansetrecipients: + ncoghlan, brett.cannon, georg.brandl, eric.araujo, Arfrever
2012-07-15 04:03:03ncoghlansetmessageid: <>
2012-07-15 04:03:02ncoghlanlinkissue15314 messages
2012-07-15 04:03:02ncoghlancreate