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 Claudiu.Popa, brett.cannon, eric.snow, ncoghlan, srittau
Date 2014-05-05.13:46:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399297619.95.0.360502888267.issue21436@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-05-05 13:47:00brett.cannonsetrecipients: + brett.cannon, srittau, ncoghlan, Claudiu.Popa, eric.snow
2014-05-05 13:46:59brett.cannonsetmessageid: <1399297619.95.0.360502888267.issue21436@psf.upfronthosting.co.za>
2014-05-05 13:46:59brett.cannonlinkissue21436 messages
2014-05-05 13:46:59brett.cannoncreate