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 brett.cannon
Recipients brett.cannon
Date 2013-08-25.15:16:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377443801.78.0.926402532335.issue18831@psf.upfronthosting.co.za>
In-reply-to
Content
Not sure if anyone really cares about this (I don't, but I figured I should at least let it be known), but I realized that importlib.import_module() bypasses builtins.__import__ by calling directly into the innards of importlib (specifically _gcd_import() which skips all the extra setup that __import__ entails and which is unnecessary for programmatic imports).

The docs for importlib.import_module() clearly state it uses importlib.__import__, but I'm not sure if anyone would be surprised if they replaced builtins.__import__ and found that importlib.import_module() was doing an end-run around their custom import system, especially since we are promoting importlib.import_module() over calling builtins.__import__ directly.
History
Date User Action Args
2013-08-25 15:16:41brett.cannonsetrecipients: + brett.cannon
2013-08-25 15:16:41brett.cannonsetmessageid: <1377443801.78.0.926402532335.issue18831@psf.upfronthosting.co.za>
2013-08-25 15:16:41brett.cannonlinkissue18831 messages
2013-08-25 15:16:41brett.cannoncreate