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

Modernize Sphinx configuration #711

Merged
merged 2 commits into from Oct 1, 2023
Merged

Modernize Sphinx configuration #711

merged 2 commits into from Oct 1, 2023

Conversation

stefan6419846
Copy link
Contributor

Short description

This PR resolves the build warnings when building the docs with the latest Sphinx versions. Additionally, some missing issue/PR links have been added.

Proposed changes

  • Set language code to English due to:

    WARNING: Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English).

  • Switch to the new intersphinx_mapping format due to:

    WARNING: The pre-Sphinx 1.0 'intersphinx_mapping' format is deprecated and will be removed in Sphinx 8. Update to the current format as described in the documentation. Hint: "intersphinx_mapping = {'': ('https://docs.python.org/', None)}".https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping

  • Add a newline to resolve

    /home/docs/checkouts/readthedocs.org/user_builds/xhtml2pdf/checkouts/latest/docs/source/release-notes.rst:163: WARNING: Line block ends without a blank line.

  • Use the issue/PR number for the issue and PR directive labels to fix

    Exception occurred:
      File "/home/docs/checkouts/readthedocs.org/user_builds/xhtml2pdf/envs/latest/lib/python3.9/site-packages/sphinx/ext/extlinks.py", line 108, in role
        title = caption % part
    TypeError: not all arguments converted during string formatting
    

    This is documented in the official docs at https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html: The caption (the second tuple element) needs to always be either None to use the full URL or a string which contains the placeholder %s exactly once.

    Additionally, the directives have been fixed to use the format from the official docs inside the actual RST.

Resolved issues

Fixes: #710

Copy link
Collaborator

@timobrembeck timobrembeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks a lot for the quick fix and the improvements! 💪

@timobrembeck timobrembeck merged commit bfaad27 into xhtml2pdf:master Oct 1, 2023
@stefan6419846 stefan6419846 deleted the docs branch October 1, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation build failing
2 participants