Message217923
So it's not quite as bad as you think as SourceFileLoader.load_module() doesn't need an argument (I've opened http://bugs.python.org/issue21438 to fix the documentation). Admittedly it is a longer command than imp.load_source() to type, but there is no extra information required or a necessity that you break the command up into multiple lines.
Plus imp.load_source() is just plain bad. The reason the imp module is deprecated in Python 3.4 is because it does not expose the low-level details of import in a way that makes any sense since Python 2.3 (and yes, I meant to write 2.3 instead of 3.3; the problem has persisted _that_ long).
That being said, talks are just starting to consider undoing the documented deprecation of load_module() such that you can continue to use that as a substitute for imp.load_source()/imp.load_module().
I'm going to leave this bug open, hijack its title, and refocus this as to consider leaving importlib.abc.Loader.load_module() in importlib as the all-powerful fallback API which also simplifies transitioning from imp. |
|
Date |
User |
Action |
Args |
2014-05-05 13:47:00 | brett.cannon | set | recipients:
+ brett.cannon, srittau, ncoghlan, Claudiu.Popa, eric.snow |
2014-05-05 13:46:59 | brett.cannon | set | messageid: <1399297619.95.0.360502888267.issue21436@psf.upfronthosting.co.za> |
2014-05-05 13:46:59 | brett.cannon | link | issue21436 messages |
2014-05-05 13:46:59 | brett.cannon | create | |
|