Skip to content

Docs build fails in 3.12 #127578

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

Closed
Yhg1s opened this issue Dec 3, 2024 · 4 comments
Closed

Docs build fails in 3.12 #127578

Yhg1s opened this issue Dec 3, 2024 · 4 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@Yhg1s
Copy link
Member

Yhg1s commented Dec 3, 2024

Bug report

Bug description:

Building the epub version of the docs fails in 3.12:

% cd Docs
% make venv
[...]
% make epub
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b epub -d build/doctrees -j auto   -W . build/epub
Running Sphinx v8.1.3
matplotlib is not installed, social cards will not be generated
loading translations [en]... done
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [epub]: targets for 501 source files that are out of date
[....]
checking consistency... /home/thomas/python/python/3.12/Doc/howto/argparse.rst: document is referenced in multiple toctrees: ['library/argparse', 'howto/index'], selecting: library/argparse <- howto/argparse
done
[...]
writing toc.ncx file...
WARNING: duplicated ToC entry found: howto/argparse.xhtml [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#concepts [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#the-basics [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#introducing-positional-arguments [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#introducing-optional-arguments [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#short-options [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#combining-positional-and-optional-arguments [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#getting-a-little-more-advanced [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#specifying-ambiguous-arguments [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#conflicting-options [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#how-to-translate-the-argparse-output [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#custom-type-converters [epub.duplicated_toc_entry]
WARNING: duplicated ToC entry found: howto/argparse.xhtml#conclusion [epub.duplicated_toc_entry]
Writing evaluated template result to /home/thomas/python/python/3.12/Doc/build/epub/toc.ncx
writing Python.epub file...
build finished with problems, 13 warnings (with warnings treated as errors).
make: *** [Makefile:56: build] Error 1

Epubs are built as part of make dist (in the Doc tree), which is part of the release process. I'm not sure if the warning during "checking consistency" about howto/arparse and library/argparse is relevant. The Python 3.13 version builds successfully without warnings about duplicate ToC entries, but it does produce the warning about howto/argparse and library/argparse.

CPython versions tested on:

3.12, 3.13

Operating systems tested on:

Linux

@Yhg1s Yhg1s added the type-bug An unexpected behavior, bug, or error label Dec 3, 2024
@Yhg1s
Copy link
Member Author

Yhg1s commented Dec 3, 2024

FWIW: I built the 3.12.8 release's docs by disabling warnings and making no other changes. If this issue is fixed by something other than working around the warnings (i.e. they represent an actual problem that we should've avoided instead), we may want to re-upload the docs (possibly just the epub?) for 3.12.8.

@hugovk hugovk added the docs Documentation in the Doc dir label Dec 3, 2024
@koyuki7w
Copy link
Contributor

The cause of the warnings seems to be that multiple toctrees(https://github.com/python/cpython/blob/3.12/Doc/library/argparse.rst?plain=1#L2111, and https://github.com/python/cpython/blob/3.12/Doc/howto/index.rst?plain=1#L29) contain howto/argparse.rst and none of which have :hidden: option. In the latest version, this option was added by gh-119366, so backporting this PR resolves this issue.

@hugovk
Copy link
Member

hugovk commented Dec 11, 2024

@koyuki7w Thanks for finding that.

I've opened the backport and confirmed it fixes the epub failure: #127811.

@hugovk
Copy link
Member

hugovk commented Dec 11, 2024

And merged :)

@hugovk hugovk closed this as completed Dec 11, 2024
@hugovk hugovk moved this from Todo to Done in docs issues Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

3 participants