[Python-ideas] Add more information in the header of pyc files

Antoine Pitrou solipsis at pitrou.net
Tue Apr 10 12:54:56 EDT 2018


On Tue, 10 Apr 2018 19:29:18 +0300
Serhiy Storchaka <storchaka at gmail.com>
wrote:
> 
> A bugfix release can fix bugs in bytecode generation. See for example 
> issue27286. [1]  The part of issue33041 backported to 3.7 and 3.6 is an 
> other example. [2]  There were other examples of compatible changing the 
> bytecode. Without bumping the magic number these fixes can just not have 
> any effect if existing pyc files were generated by older compilers. But 
> bumping the magic number in a bugfix release can lead to rebuilding 
> every pyc file (even unaffected by the fix) in distributives.

Sure, but I don't think rebuilding every pyc file is a significant
problem.  It's certainly less error-prone than cherry-picking which
files need rebuilding.

Regards

Antoine.




More information about the Python-ideas mailing list