Bug#1063542: python-parsl-doc: please make the build reproducible

James Addison jay at jp-hosting.net
Fri Feb 9 14:12:27 GMT 2024


Package: python-parsl-doc
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: hostname
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Dear Maintainer,

I'm an occasional volunteer with the Reproducible Builds[1] project, and
recently noticed that the python-parsl-doc package failed to build from source
reproducibly.

The cause is that the hostname of the build host appears in some of the
documentation built by Sphinx and the autodoc extension.  The hostname
is evaluated from a class attribute that calls the Python socket.gethostname
method.

I'll attach a patch momentarily that resolves the problem by enabling the
Sphinx autodoc extension 'autodoc_preserve_defaults' configuration setting[2].
Please note that this does affect other output in the documentation.


In more detail:

The TaskVineManagerConfig dataclass includes an 'address' attribute[3] that
is set to the value of socket.gethostname() when the class is loaded.

Meanwhile, the TaskVineExecutor.__init__ method 'manager_config' argument[4]
has a default value of a no-args constructed TaskVineManagerConfig instance.

When Sphinx builds documentation, by default it will emit a Python repr() of
the manager_config argument, causing the hostname of the build host to be
included.

We can solve that by instructing the Sphinx autodoc extension to retain the
textual representation of argument lists as they are found in the source
code, instead of evaluated and repr'd equivalents.

Regards,
James

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

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

[3] - https://sources.debian.org/src/python-parsl/2023.11.13%2Bds-1/parsl/executors/taskvine/manager_config.py/#L151

[4] - https://sources.debian.org/src/python-parsl/2023.11.13%2Bds-1/parsl/executors/taskvine/executor.py/#L106



More information about the Reproducible-bugs mailing list