Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure default Set values are sorted for a reproducible build #535

Open

Conversation

@lamby
Copy link

lamby commented Oct 14, 2019

Whilst working on the Reproducible Builds effort we noticed that traitlets generates non-reproducible output which is affecting the reproducibility of other packages. For example, in nbconvert:

  -<dd><p class="first">Default: {'image/jpeg',</span> <span class="pre">'image/svg+xml',</span> [..]
  +<dd><p class="first">Default: {'image/svg+xml',</span> <span class="pre">'application/pdf',</span> [..]

(From https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/nbconvert.html as of time-of writing.)

This is due to it not iterating over a Set traitlet type in a deterministic ordering when generating the Default: [..] human-readable strings. This patch ensures that we display the Set traits defaults in a sorted, and thus reproducible, manner.

Whilst working on the Reproducible Builds effort [0] we noticed
that traitlets generates non-reproducible output which is affecting
the reproducibility of other packages. For example, in nbconvert:

  -<dd><p class="first">Default: {'image/jpeg',</span> <span class="pre">'image/svg+xml',</span> [..]
  +<dd><p class="first">Default: {'image/svg+xml',</span> <span class="pre">'application/pdf',</span> [..]

(From https://tests.reproducible-builds.org/debian/rb-pkg/unstable/
amd64/nbconvert.html on 20191014)

This is due to it not iterating over a Set traitlet type in a
deterministic ordering when generating the "Default:" human-readable
string.

This patch ensures that we display the Set traits defaults in a
sorted, and thus reproducible, manner.

  [0] https://reproducible-builds.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.