Skip to content

Commit

Permalink
Infra: Fix 404s (python#3760)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <[email protected]>
  • Loading branch information
AA-Turner and hugovk authored Apr 23, 2024
1 parent 5feac32 commit 7c00075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions pep_sphinx_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
from sphinx.application import Sphinx


def _depart_maths():
pass # No-op callable for the type checker


def _update_config_for_builder(app: Sphinx) -> None:
app.env.document_ids = {} # For PEPReferenceRoleTitleText
app.env.settings["builder"] = app.builder.name
Expand Down Expand Up @@ -84,8 +80,8 @@ def setup(app: Sphinx) -> dict[str, bool]:
app.connect("env-before-read-docs", create_pep_zero) # PEP 0 hook

# Mathematics rendering
inline_maths = HTMLTranslator.visit_math, _depart_maths
block_maths = HTMLTranslator.visit_math_block, _depart_maths
inline_maths = HTMLTranslator.visit_math, None
block_maths = HTMLTranslator.visit_math_block, None
app.add_html_math_renderer("maths_to_html", inline_maths, block_maths) # Render maths to HTML

# Parallel safety: https://www.sphinx-doc.org/en/master/extdev/index.html#extension-metadata
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pygments >= 2.9.0
# Sphinx 6.1.0 broke copying images in parallel builds; fixed in 6.1.2
# See https://github.com/sphinx-doc/sphinx/pull/11100
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1, < 7.3
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1
docutils >= 0.19.0

sphinx-autobuild
Expand Down

0 comments on commit 7c00075

Please sign in to comment.