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 syeberman
Recipients brett.cannon, eric.snow, syeberman, terry.reedy
Date 2016-09-07.11:04:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CA+No7BQxH530hsoN-=yqQ+PUjr2+r21dqZTfJ9eLzCOBW2mUSA@mail.gmail.com>
In-reply-to <1473218946.07.0.553561837469.issue16384@psf.upfronthosting.co.za>
Content
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 <report@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 <report@bugs.python.org>
> <http://bugs.python.org/issue16384>
> _______________________________________
>
History
Date User Action Args
2016-09-07 11:04:34syebermansetrecipients: + syeberman, brett.cannon, terry.reedy, eric.snow
2016-09-07 11:04:34syebermanlinkissue16384 messages
2016-09-07 11:04:33syebermancreate