Sye van der Veen added the comment:

I feel this patch (file44424) misses the mark. Any two Python processes
that try to import a module, without a pyc, at the same time could suffer
race conditions.  The first process will start to write the pyc, get
interrupted, and the second will fail with an EOFError.

When importing encodings at startup, this is a nasty abort. But it's just
as nasty if a running script gets unpredictable EOFErrors.

Corrupt .pyc files should not prevent importing if the valid .py files are
available.

On Tue, Sep 6, 2016, 11:29 PM Eric Snow <rep...@bugs.python.org> wrote:

>
> Eric Snow added the comment:
>
> After looking more closely, it looks like we should be ignoring such bogus
> modules.  Here's a patch to do so.
>
> ----------
> keywords: +patch
> stage: test needed -> patch review
> Added file: http://bugs.python.org/file44424/issue16384.diff
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue16384>
> _______________________________________
>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16384>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to