Eric Snow added the comment: Here's a patch to soften the impact of pyc-related problems.
Note: * Each pyc-related case that previously caused import to fail now results in an ImportWarning. This applies to both reading and writing .pyc files. * Each warning has __cause__ set to the caught exception. * Some cases where the exception was already being swallowed now result in a warning while others are still swallowed. * The tests verify that the warnings, with appropriate causes, are issued. * The tests verify that existing bad .pyc file get overwritten. * importlib._bootstrap_external.StaleBytecodeError is new. It should surface only from SourcelessFileLoader. * SourcelessFileLoader is not changed. ---------- keywords: +patch Added file: http://bugs.python.org/file44601/issue28007.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28007> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com