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 belopolsky, brett.cannon, christian.heimes, eric.snow, facundobatista, georg.brandl, ncoghlan, python-dev, stocker81
Date 2012-08-24.17:34:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345829660.66.0.356982579649.issue2051@psf.upfronthosting.co.za>
In-reply-to
Content
I agree with Eric: set_data() is meant to be generic so as to allow writing arbitrary data, not just bytecode files. So while accepting a mode argument makes sense and I'm fine with in terms of possible API change (in the future), having a source_path argument I'm not comfortable with. So I'm going to just take Eric's idea and commit the change. I'm also making the argument _mode just to make sure no one relies on it until we can discuss API changes in the context of Python 3.4 sine we will need to clean up the loader APIs to have abstract source/bytecode stuff that can play nicely with file-based APIs to allow for reading generic file assets once we have all of these little bugs worked out.

And as for why set_data() is not part of FileLoader, that's because it isn't necessary to load files. =) It's in SourceFileLoader purely to facilitate writing bytecode files, but set_data() is not used at all in terms of the actual loading of source code (or bytecode files for that matter).
History
Date User Action Args
2012-08-24 17:34:20brett.cannonsetrecipients: + brett.cannon, georg.brandl, facundobatista, ncoghlan, belopolsky, christian.heimes, stocker81, python-dev, eric.snow
2012-08-24 17:34:20brett.cannonsetmessageid: <1345829660.66.0.356982579649.issue2051@psf.upfronthosting.co.za>
2012-08-24 17:34:20brett.cannonlinkissue2051 messages
2012-08-24 17:34:19brett.cannoncreate