[Python-Dev] "Some" .pyc files not ending up in __pycache__ during installation

Nick Coghlan ncoghlan at gmail.com
Sat Feb 19 14:29:36 CET 2011


On Sat, Feb 19, 2011 at 11:14 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Sat, 19 Feb 2011 23:07:17 +1000
> Nick Coghlan <ncoghlan at gmail.com> wrote:
>>
>> While this is definitely untidy, it doesn't strike me as a release
>> blocker. More of a "fix it in 3.2.1", since the status quo will
>> *work*, it just means the precompiled file will be ignored on first
>> execution with newer Python versions.
>
> Are you sure? If the package gets installed in a root-writable-only
> directory, later execution cannot create the right pyc files.

Worst case, it will run from the source file. It may even use the
legacy .pyc file in the case where it can't write to __pycache__ (I
don't remember how that particular subtlety of PEP 3147 played out).
Certainly not ideal from a performance point of view, but also not
difficult to workaround once discovered.

> This certainly looks like a critical issue (hopefully not release
> blocker).

As a performance problem that only arises in some situations when
using distutils to do bulk compilation, and with running "compileall"
as root available as a relatively straightforward workaround, I
personally think it can wait until 3.2.1.

So I'd agree with the critical-but-not-a-release-blocker assessment,
but it's ultimately Georg's call.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list