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

[merge with Python 3.9 ~ October 2024] Preserve argument defaults to Sphinx documentation #3225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 10, 2024

  1. Preserve argument defaults to Sphinx documentation

    This change improves Sphinx documentation reproducibility by
    preserving argument defaults.
    
    The TaskVineManagerConfig dataclass includes an 'address' attribute
    that is set to the value of socket.gethostname() when the class is
    loaded.
    
    Meanwhile, the TaskVineExecutor.__init__ method 'manager_config'
    argument 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.
    
    Signed-off-by: Étienne Mollier <emollier@debian.org>
    jayaddison authored and emollier committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    f740f60 View commit details
    Browse the repository at this point in the history