Skip to content

Python 3.10.7 Docs fails with Sphinx 5.3.0 #98366

Description

@marxin

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>}

@AA-Turner

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Oct 17, 2022
  2. marxin commented on Oct 17, 2022

    @marxin
    Author
  3. marxin commented on Oct 18, 2022

    @marxin
    Author

    CCing the hunk author: @zooba.

  4. mattwang44 commented on Oct 19, 2022

    @mattwang44
    Contributor

    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.translators is originally a defaultdict(gettext.NullTranslations) but changed to a dict in this commit. Modify pyspecific.py's translators['sphinx'] (3 occurrences) to translators[('general', 'sphinx')] should probably solve the issue?

  5. marxin commented on Oct 19, 2022

    @marxin
    Author

    Modify pyspecific.py's translators['sphinx'] (3 occurrences) to translators[('general', 'sphinx')] should probably solve the issue?

    Great you found the commit which caused that. Can you please create a pull request that will make the change?

  6. AA-Turner commented on Oct 19, 2022

    @AA-Turner
    Member

    I believe sphinx.locale._ could be used to the same effect, which is backwards compatible.

    A

  7. changed the title [-]Python 3.10.7 Docs fails with Sphixn 5.3.0[/-] [+]Python 3.10.7 Docs fails with Sphinx 5.3.0[/+] on Oct 19, 2022
  8. added a commit that references this issue on Nov 11, 2022
  9. added 4 commits that reference this issue on Nov 11, 2022
  10. added a commit that references this issue on Nov 12, 2022
  11. hauntsaninja commented on Mar 25, 2023

    @hauntsaninja
    Contributor

    Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions