[Distutils] reproducible builds

Robin Becker robin at reportlab.com
Wed Mar 22 04:57:28 EDT 2017


On 21/03/2017 16:52, Brett Cannon wrote:
> On Tue, 21 Mar 2017 at 04:54 Marius Gedminas <marius at gedmin.as> wrote:
.....
>>
>> Python 3.6 changed the dict implementation so the ordering is always stable
>> (and matches insertion order).
>>
>
> Do realize that is an implementation detail and not guaranteed by the
> language specification, so it won't necessarily hold in the future or for
> other interpreters.
>
> -Brett

one of the main issues in the reportlab pdf variability are the dict objects 
which come out as

<<
/Key1 value
.....
/Key n
 >>

I think we have these coming out in sorted order without reliance on the 
underlying dicts. Up to now we used pixel equality ie the appearance, but as I 
understand it, reproducibility means byte equality which is harder. A bit of 
work has been done making the variation between Python 2.7 & 3.6 renderings go 
away. This reproducibility effort has revealed several bugs which is in itself 
useful.
-- 
Robin Becker


More information about the Distutils-SIG mailing list