#1066017 xonsh-doc: please make the build reproducible.

Package:
xonsh-doc
Source:
xonsh-doc
Submitter:
James Addison
Date:
2024-09-17 11:39:03 UTC
Severity:
normal
Tags:
#1066017#5
Date:
2024-03-10 23:39:10 UTC
From:
To:
Dear Maintainer,

I'm an occasional volunteer contributor with the Reproducible Builds[1]
project, and noticed recently that the xonsh-doc package failed[2] an automated
reproducibility test on Debian.

From investigation, it seems that most (but not all) of the cause of
non-reproducibility during the test was due to the Sphinx autodoc extension
evaluating some of the default Python method values (like
xonsh.environ.HOSTNAME[3]) at build-time and including the GeneralSetting
object address, which varied, in the documentation.

As a workaround, we can enable the 'autodoc_preserve_defaults'[4] configuration
setting, meaning that Sphinx will render the method signature defaults using the
original source code as-written, instead of evaluating the corresponding
values.

I'll offer a merge request on Salsa to make that change, and will link that to
this bugreport.

Thanks,
James

[1] - https://reproducible-builds.org/

[2] - https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/xonsh.html

[3] - https://sources.debian.org/src/xonsh/0.14.4%2Bdfsg-1/docs/conf.py/#L317-L320
https://sources.debian.org/src/xonsh/0.14.4%2Bdfsg-1/xonsh/environ.py/#L873-L877

[4] - https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_preserve_defaults

#1066017#10
Date:
2024-03-11 00:16:43 UTC
From:
To:

#1066017#17
Date:
2024-09-17 11:34:55 UTC
From:
To:
Control: tags -1 - patch
Control: tags -1 + help

I recently pushed a few drive-by commits to this package, so I had a
look at the BTS/MRs and was ready to merge, but then saw the comment on
the MR: "this change doesn't appear to be producing the expected effect.
Further work is required.". Tagging appropriately. James, if you ever
find the time to resume work on this, would be happy to review and
merge.

On that matter, the main xonsh package now FTBR too, something with the
generated PLY/YACC parser...

Faidon