Message196144
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. |
|
Date |
User |
Action |
Args |
2013-08-25 15:16:41 | brett.cannon | set | recipients:
+ brett.cannon |
2013-08-25 15:16:41 | brett.cannon | set | messageid: <1377443801.78.0.926402532335.issue18831@psf.upfronthosting.co.za> |
2013-08-25 15:16:41 | brett.cannon | link | issue18831 messages |
2013-08-25 15:16:41 | brett.cannon | create | |
|