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 gregory.p.smith
Recipients brett.cannon, gregory.p.smith, pitrou, twouters
Date 2015-03-20.21:22:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426886562.28.0.0443194540811.issue23723@psf.upfronthosting.co.za>
In-reply-to
Content
This would avoid the need to modify an interpreter to have this optimization.  In this mode the potentially expensive stat() call is avoided.  No need to ensure that the pyc file's embedded timestamp matches the py file's timestamp.  The only use of this mode would be when that is guaranteed by a build system so loading modules continues to be fast without reverting to loading the py when the pyc is already known good.

Our specific example is a build system that generates pyc's for some py files at build time but timestamps of files are not maintained at all through the build/packaging/distribution process because they are seen an irrelevant detail and not even kept track of by the build.  Python is fairly unique in wanting to depend upon file timestamp metadata as a form of input data going from py -> pyc.

Right now we work around the problem by not having py files available at all in this situation.  Using .pycs greatly speeds up the program's load time, but not having source code around makes for worse tracebacks and causes problems with other tools which need to use the source.
History
Date User Action Args
2015-03-20 21:22:42gregory.p.smithsetrecipients: + gregory.p.smith, twouters, brett.cannon, pitrou
2015-03-20 21:22:42gregory.p.smithsetmessageid: <1426886562.28.0.0443194540811.issue23723@psf.upfronthosting.co.za>
2015-03-20 21:22:42gregory.p.smithlinkissue23723 messages
2015-03-20 21:22:42gregory.p.smithcreate