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 barry
Recipients barry, brett.cannon, eric.snow, ncoghlan, r.david.murray, syeberman, terry.reedy
Date 2016-09-09.22:32:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20160910103225.21f87091@anarchist.wains.cybercomglobal.com>
In-reply-to <1473453055.84.0.63227173455.issue28007@psf.upfronthosting.co.za>
Content
On Sep 09, 2016, at 08:30 PM, Terry J. Reedy wrote:

>I think we should definitely fall back to using the .py file.  A cache is an
>implementation convenience, not a language feature.

+1.  If the cache is corrupt, it should be ignored and recreated.  There are
of course situations where that may not be possible though, e.g. if the .pyc
is on a read-only file system or the user doesn't have permission to write the
.pyc.  Still in those cases, if the .py is okay, but the .pyc is not, we
should do a source import.  I believe we already don't fall over if the .pyc
isn't writable, so let's keep that.  Although I don't think it's worth it, we
could add some extra knobs to warn about this case, or to be strict about not
allowing source imports.
History
Date User Action Args
2016-09-09 22:32:36barrysetrecipients: + barry, brett.cannon, terry.reedy, ncoghlan, syeberman, r.david.murray, eric.snow
2016-09-09 22:32:36barrylinkissue28007 messages
2016-09-09 22:32:36barrycreate