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 Arfrever, barry, brett.cannon, eric.snow, ncoghlan, neologix, pitrou, python-dev
Date 2012-01-09.22:18:08
SpamBayes Score 1.3465943e-08
Marked as misclassified No
Message-id <1326147489.6.0.0802188395507.issue13645@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not suggesting two stat calls (in the general case); you would call one or the other depending on the magic number of the pyc file.

Anyway, it would probably be best to have some method that is expected to return a specific object which embodies all the desired information for bytecode generation (and if you encompass source code with this object then you can get rid of get_source() as well). But it shouldn't be a raw stat object since not all bits of information will come from a stat call (eg. storing bytecode in a sqlite3 database) and thus require bogus data. If you want to move towards that kind of API I can support that.

As for path_mtime() returning an int instead of some number that can be converted to an int, that's because I didn't plan for the "Antoine wants to muck with the .pyc format" contingency (IOW I just didn't think about it). =) It wouldn't be a big deal to change the API to take a keyword-only argument specifying you want the highest resolution number instead of specifically an int.
History
Date User Action Args
2012-01-09 22:18:09brett.cannonsetrecipients: + brett.cannon, barry, ncoghlan, pitrou, Arfrever, neologix, python-dev, eric.snow
2012-01-09 22:18:09brett.cannonsetmessageid: <1326147489.6.0.0802188395507.issue13645@psf.upfronthosting.co.za>
2012-01-09 22:18:09brett.cannonlinkissue13645 messages
2012-01-09 22:18:08brett.cannoncreate