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 Timothy.Fitz, afriesen, brett.cannon, pitrou, rhettinger
Date 2010-04-13.18:51:20
SpamBayes Score 1.9868192e-07
Marked as misclassified No
Message-id <1271184683.38.0.743809922868.issue8379@psf.upfronthosting.co.za>
In-reply-to
Content
So technically Python does not know that some bytecode was compiled with optimization flags on; that is simply not carried in the bytecode format. You also cannot rely on file name extensions as the bytecode could have been generated by an interpreter that used .pyo as the file extension for non-optimized bytecode. So you can't really make this an "explicit error" without changing the format of bytecode files.

As for a distribution choice for only shipping bytecode, you should then only ship .pyc files to avoid this issue.

Raymond who (most likely) added the optimization is already on the nosy list so he can decide to disagree with me if he wants, but I am personally still not viewing this as a bug.
History
Date User Action Args
2010-04-13 18:51:23brett.cannonsetrecipients: + brett.cannon, rhettinger, pitrou, afriesen, Timothy.Fitz
2010-04-13 18:51:23brett.cannonsetmessageid: <1271184683.38.0.743809922868.issue8379@psf.upfronthosting.co.za>
2010-04-13 18:51:21brett.cannonlinkissue8379 messages
2010-04-13 18:51:20brett.cannoncreate