[Python-ideas] disabling .pyc and .pyo files

Collin Winter collinw at gmail.com
Thu Dec 10 06:07:47 CET 2009


On Wed, Dec 9, 2009 at 9:04 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>
>> When changing the bytecode sequence produced by the CPython compiler,
>> it would be useful to make sure that a module is being compiled from
>> scratch (and hence using the new version of the compiler) instead of
>> reusing older bytecode from a .pyc file. You might say that we should
>> simply increase the magic number with each iteration,
>
> Or simply "rm -f `find -name *.pyc`" :-)

As I said, "We currently handle this by deleting all .pyc/.pyo files
in our library tree, but that gets more expensive the more third-party
libraries we bring in for testing, and it's not foolproof."

I tire of quoting myself.

Collin



More information about the Python-ideas mailing list