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 frozen object descriptions are reproducible #5388
Conversation
c146f6e
to
fb9dadc
Compare
Codecov Report
@@ Coverage Diff @@
## master #5388 +/- ##
==========================================
- Coverage 82.5% 82.49% -0.01%
==========================================
Files 286 286
Lines 39112 39131 +19
Branches 5932 5936 +4
==========================================
+ Hits 32268 32283 +15
- Misses 5431 5433 +2
- Partials 1413 1415 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
Could you rebase this into 1.8 branch?
Then I'll merge this soon.
Whilst working on the Reproducible Builds effort [0], we noticed
that sphinx could generate output that is not reproducible.
In particular, the rendering of `frozenset` objects in default
arguments and elsewhere is currently non-determinstic.
For example:
frozenset(['a', 'b', 'c'])
Might be rendered as any of:
frozenset({'a', 'b', 'c'})
frozenset({'a', 'c', 'b'})
frozenset({'b', 'a', 'c'})
frozenset({'b', 'c', 'a'})
frozenset({'c', 'a', 'b'})
frozenset({'c', 'b', 'a'})
Patch attached that sorts the contents of frozensets whilst rendering.
This is parallel to the `dict` and `set` type logic
[0] https://reproducible-builds.org/
fb9dadc
to
17d32d6
Compare
|
Rebased against |
|
Thanks a lot! |
|
Thanks @tk0miya. Do you know when this might hit a release? :) |
|
It will be released within a few days. Please watch #4986. |
Whilst working on the Reproducible Builds effort, we noticed that sphinx could generate output that is not reproducible.
In particular, the rendering of
frozensetobjects in default arguments and elsewhere is currently non-determinstic.For example:
Might be rendered as any of:
Patch attached that sorts the contents of frozensets whilst rendering. This is parallel to the
dictandsettype logic