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 byrnes
Recipients byrnes
Date 2015-11-23.15:44:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
zipimport is not PEP 3147 compliant: i.e., it looks for foo.pyc (in the same directory as instead of __pycache__/foo.cpython-35.pyc.  This is counterintuitive, and unfortunate because it means that installation directories (that obey PEP 3147 conventions) can't be zip archived from filesystems and then used by zipimport.

When support for PEP 488 was added to Python 3.5, zipimport was modified to just delete references to .pyo files, but it needs to know about the new .opt-[12] filename components (as well as the PEP 3147 version tags).  As far as I can tell, the current version of zipimport can't import optimized bytecode files, using either the old or new filename conventions.

Finally, none of this behavior is documented.  The zipimport docs still mention .pyo files (which were eliminated by PEP 488), and say nothing about the filename conventions expected within zip archives.
Date User Action Args
2015-11-23 15:44:56byrnessetrecipients: + byrnes
2015-11-23 15:44:56byrnessetmessageid: <>
2015-11-23 15:44:56byrneslinkissue25710 messages
2015-11-23 15:44:56byrnescreate