Repository navigation
Python 3.10.7 Docs fails with Sphinx 5.3.0 #98366
Copy link
Copy link
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Noticed that here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:L/python310:doc/standard/x86_64
[ 32s] + /usr/bin/make -O -j8 V=1 VERBOSE=1 -j1 html
[ 32s] mkdir -p build
[ 32s] Using existing Misc/NEWS file
[ 32s] PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -j auto -W . build/html
[ 33s] Running Sphinx v5.3.0
[ 33s] making output directory... done
[ 33s] building [mo]: targets for 0 po files that are out of date
[ 33s] building [html]: targets for 487 source files that are out of date
[ 34s] updating environment: [new config] 487 added, 0 changed, 0 removed
[ 34s]
[ 34s] Sphinx parallel build error:
[ 34s] KeyError: 'sphinx'
The problematic line:
395 label = translators['sphinx'].gettext(label)
If I print the content of translators I get:
{('console', 'sphinx'): <gettext.NullTranslations object at 0x7ffff7664eb0>, ('general', 'sphinx'): <gettext.NullTranslations object at 0x7ffff6113cd0>, ('general', 'sphinxcontrib.applehelp'): <gettext.NullTranslations object at 0x7ffff5620910>, ('console', 'sphinxcontrib.applehelp'): <gettext.NullTranslations object at 0x7ffff56209d0>, ('general', 'sphinxcontrib.devhelp'): <gettext.NullTranslations object at 0x7ffff5622d40>, ('console', 'sphinxcontrib.devhelp'): <gettext.NullTranslations object at 0x7ffff5623e20>, ('general', 'sphinxcontrib.htmlhelp'): <gettext.NullTranslations object at 0x7ffff5623f10>, ('console', 'sphinxcontrib.htmlhelp'): <gettext.NullTranslations object at 0x7ffff5623f40>, ('general', 'sphinxcontrib.serializinghtml'): <gettext.NullTranslations object at 0x7ffff564ceb0>, ('console', 'sphinxcontrib.serializinghtml'): <gettext.NullTranslations object at 0x7ffff564cf10>, ('general', 'sphinxcontrib.qthelp'): <gettext.NullTranslations object at 0x7ffff564cfa0>, ('console', 'sphinxcontrib.qthelp'): <gettext.NullTranslations object at 0x7ffff564d630>, ('general', 'about'): <gettext.NullTranslations object at 0x7ffff56a2830>, ('general', 'bugs'): <gettext.NullTranslations object at 0x7ffff56a3790>, ('general', 'c-api'): <gettext.NullTranslations object at 0x7ffff536a800>}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
marxin commentedon Oct 17, 2022
python.log.txt
marxin commentedon Oct 18, 2022
CCing the hunk author: @zooba.
mattwang44 commentedon Oct 19, 2022
This issue is also observed in the python-docs-zh-tw's CI jobs for building the translated Python 3.11 doc. Here is the sample GitHub Action log.
sphinx.locale.translatorsis originally adefaultdict(gettext.NullTranslations)but changed to adictin this commit. Modify pyspecific.py'stranslators['sphinx'](3 occurrences) totranslators[('general', 'sphinx')]should probably solve the issue?marxin commentedon Oct 19, 2022
Great you found the commit which caused that. Can you please create a pull request that will make the change?
AA-Turner commentedon Oct 19, 2022
I believe
sphinx.locale._could be used to the same effect, which is backwards compatible.A
[-]Python 3.10.7 Docs fails with Sphixn 5.3.0[/-][+]Python 3.10.7 Docs fails with Sphinx 5.3.0[/+]gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (#98437)
pythongh-98366: use sphinx.locale._ as gettext() in pyspecific.py (py…
pythongh-98366: use sphinx.locale._ as gettext() in pyspecific.py (py…
gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (GH-98437)
gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (GH-98437)
pythongh-98366: use sphinx.locale._ as gettext() in pyspecific.py (py…
hauntsaninja commentedon Mar 25, 2023
Thanks for fixing this!