Docs: EPUB builds are broken #136155
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Description
Documentation
#132220 has broken EPUB builds of documentation. This has been only partially fixed in #133720, because yet configuration of sphinxext-opengraph adds not closed tags to every page.
sphinx-doc/sphinxext-opengraph#136 and sphinx-doc/sphinxext-opengraph#137 have been opened upstream, but the PR is not merged.
Status update [2025-07-14]: now (after skipping OpenGraph custom tags in Docs conf.py) only 8 chapters fail to render in EPUB format. It can be addressed by any of sphinx-doc/sphinxext-opengraph#120 and sphinx-doc/sphinxext-opengraph#137, as far as I'm concerned. Adding a CI check definitely should help with the stability of EPUB build. Last year Inada made an effort to fix the EPUB (#118689).
Linked PRs
- gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds #136187
- gh-136155: Docs: check for EPUB fatal errors in CI #134074
- [3.14] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) #136382
- [3.13] gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (GH-136187) #136383
- [3.12] gh-136155: Use
sphinxext-opengraphv0.12.0 #136406 - GH-136155: Use
sphinxext-opengraphv0.11.0 #137348 - [3.14] GH-136155: Use
sphinxext-opengraphv0.11.0 (GH-137348) #137349 - [3.13] GH-136155: Use
sphinxext-opengraphv0.11.0 (GH-137348) #137350 - GH-136155: Fail the EPUB check on fatal errors #137351
- GH-136155: Use
sphinxext-opengraphv0.12.0 #137393 - [3.14] GH-136155: Use
sphinxext-opengraphv0.12.0 (GH-137393) #137431 - [3.13] GH-136155: Use
sphinxext-opengraphv0.12.0 (GH-137393) #137432 - [3.13] gh-136155: Docs: check for EPUB fatal errors in CI (GH-134074) #137538
- [3.14] gh-136155: Docs: check for EPUB fatal errors in CI (GH-134074) #137539
- [3.12] GH-136155: Use
sphinxext-opengraphv0.12.0 (GH-137393) #138741 - [3.12] gh-136155: Docs: check for EPUB fatal errors in CI (GH-134074) #145471
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Projects
- StatusShow more project fieldsTodo

Activity
hugovk commentedon Jul 1, 2025
Would you like to open a PR with your tags suggestion from #134071 (comment)?
Otherwise, let's do #134071.
pythongh-136155: Docs: don't add custom OpenGraph protocol meta tags …
m-aciek commentedon Jul 1, 2025
I've figured out the tags approach and confirmed it works locally: #136187.
gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTM…
pythongh-136155: Docs: only add custom OpenGraph protocol meta tags f…
pythongh-136155: Docs: only add custom OpenGraph protocol meta tags f…
hugovk commentedon Jul 8, 2025
#136187 has improved it but not fixed them all: #136187 (comment)
They are:
Here's the first couple, the rest are also all similar email address tags:
(macOS tip: opening the EPUB in BBEdit gives a folder-based UI and you can see the plaintext xhtml files inside.)
[3.14] gh-136155: Docs: only add custom OpenGraph protocol meta tags …
[3.13] gh-136155: Docs: only add custom OpenGraph protocol meta tags …
[3.12] pythongh-136155: Docs: only add custom OpenGraph protocol meta…
pythongh-136155: Docs: only add custom OpenGraph protocol meta tags f…
39 remaining items
[3.12] pythonGH-136155: Use ``sphinxext-opengraph`` v0.12.0 (pythonGH…
hugovk commentedon Sep 10, 2025
There's still a problem with the 3.12 EPUB: #136406 (comment)
Here's an extra backport to fix it: #138741
[3.12] GH-136155: Use ``sphinxext-opengraph`` v0.12.0 (GH-137393) (#1…
m-aciek commentedon Sep 25, 2025
With 3.12 fixed, let's close
hugovk commentedon Sep 30, 2025
Do we also need to fix the other security branches: 3.9-3.11?
AA-Turner commentedon Sep 30, 2025
#132220 wasn't backported that far, so there shouldn't've been any changes on our side, it would only be if a bad opengraph version is still there.
hugovk commentedon Sep 30, 2025
https://docs.python.org/3.11/download.html still has a bad EPUB: https://docs.python.org/3.11/archives/python-3.11.13-docs.epub
3.9 and 3.10 are good.
hugovk commentedon Oct 23, 2025
Looking good now, I checked 3.9, 3.11 and 3.14 🚀
[3.12] pythongh-136155: Docs: check for EPUB fatal errors in CI (pyth…
[3.12] gh-136155: Docs: check for EPUB fatal errors in CI (GH-134074) (…