[Python-Dev] Deterministic builds of the interpreter

Freddy Rietdijk freddyrietdijk at fridh.nl
Thu Feb 16 12:03:16 EST 2017


Hi,

Are there anymore suggestions how to improve the determinism of the Python
3 interpreter? As I mentioned, it seems only sets cause unreproducible
bytecode. Sets have no order. But when generating the bytecode, I would
expect there would still be an order since the code isn't actually
executed, right?


On Fri, Feb 10, 2017 at 12:03 PM, INADA Naoki <songofacandy at gmail.com>
wrote:

> On Fri, Feb 10, 2017 at 7:58 PM, Freddy Rietdijk
> <freddyrietdijk at fridh.nl> wrote:
> > For Python 3.5 PYTHONHASHSEED doesn't seem to be sufficient, these items
> > still seem indeterministic.
> > To be sure, I ran `PYTHONHASHSEED=1 $out/bin/python -m compileall -f
> $out`
> > where $out is the path where I installed Python.
> >
> > Do you have an idea why in [3], this is Python 2.7, the timestamps are
> still
> > incorrect? I think they're all required for `compileall` and somehow it
> > doesn't seem capable of taking into account DETERMINISTIC_BUILD.
> Explicitly
> > removing those pyc and pyo files and recompiling them to bytecode still
> > results in timestamp issues for these 4 files.
>
> Sorry, I have no motivation about Python 2 anymore.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170216/f4fc2006/attachment.html>


More information about the Python-Dev mailing list