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, eric.snow, pitrou, r.david.murray
Date 2012-04-16.21:13:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334610825.15.0.928567560303.issue14551@psf.upfronthosting.co.za>
In-reply-to
Content
Well, I want backwards-compatibility *now*, not forever.

And no, it is not an obvious API as you are asking for what loaders are supposed to do; load a module, which is why the one-liner I gave you works today. Finder simply find a loader that can load something that they are asked to discover. Loader then load something that they are told to load, whether it was found through a finder for sys.path or explicitly pointed at something.

Another option is to have SourceFileLoader.load_module() take no argument since its constructor already has everything needed to load a module passed in which simplifies the API a little bit. But that would be a non-standard broadening of the loader API and I don't know if people will like that.
History
Date User Action Args
2012-04-16 21:13:45brett.cannonsetrecipients: + brett.cannon, pitrou, r.david.murray, eric.snow
2012-04-16 21:13:45brett.cannonsetmessageid: <1334610825.15.0.928567560303.issue14551@psf.upfronthosting.co.za>
2012-04-16 21:13:44brett.cannonlinkissue14551 messages
2012-04-16 21:13:44brett.cannoncreate