Sphinx 7.3.7__py3-none-any.whl → 7.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Sphinx might be problematic. Click here for more details.
- sphinx/__init__.py +5 -6
- sphinx/_cli/__init__.py +296 -0
- sphinx/_cli/util/__init__.py +0 -0
- sphinx/_cli/util/colour.py +103 -0
- sphinx/_cli/util/errors.py +165 -0
- sphinx/application.py +78 -43
- sphinx/builders/__init__.py +59 -15
- sphinx/builders/_epub_base.py +11 -5
- sphinx/builders/changes.py +2 -2
- sphinx/builders/epub3.py +2 -2
- sphinx/builders/gettext.py +10 -10
- sphinx/builders/html/__init__.py +56 -54
- sphinx/builders/latex/__init__.py +5 -5
- sphinx/builders/latex/constants.py +5 -0
- sphinx/builders/linkcheck.py +73 -38
- sphinx/builders/texinfo.py +1 -1
- sphinx/cmd/build.py +1 -1
- sphinx/cmd/quickstart.py +11 -11
- sphinx/config.py +57 -38
- sphinx/directives/__init__.py +7 -9
- sphinx/directives/code.py +12 -15
- sphinx/directives/other.py +12 -15
- sphinx/directives/patches.py +26 -0
- sphinx/domains/__init__.py +1 -1
- sphinx/domains/c/__init__.py +5 -5
- sphinx/domains/c/_ast.py +436 -12
- sphinx/domains/c/_symbol.py +89 -134
- sphinx/domains/changeset.py +3 -4
- sphinx/domains/cpp/__init__.py +5 -6
- sphinx/domains/cpp/_ast.py +822 -25
- sphinx/domains/cpp/_symbol.py +3 -0
- sphinx/domains/javascript.py +3 -6
- sphinx/domains/math.py +3 -2
- sphinx/domains/python/__init__.py +44 -6
- sphinx/domains/python/_object.py +7 -5
- sphinx/domains/rst.py +2 -2
- sphinx/domains/std/__init__.py +95 -14
- sphinx/environment/__init__.py +35 -15
- sphinx/environment/adapters/indexentries.py +71 -24
- sphinx/environment/adapters/toctree.py +1 -1
- sphinx/environment/collectors/__init__.py +18 -4
- sphinx/environment/collectors/asset.py +4 -4
- sphinx/environment/collectors/toctree.py +27 -14
- sphinx/events.py +7 -6
- sphinx/ext/apidoc.py +377 -170
- sphinx/ext/autodoc/__init__.py +13 -13
- sphinx/ext/autodoc/directive.py +10 -13
- sphinx/ext/autodoc/mock.py +10 -7
- sphinx/ext/autodoc/preserve_defaults.py +1 -1
- sphinx/ext/autodoc/typehints.py +2 -2
- sphinx/ext/autosummary/__init__.py +15 -9
- sphinx/ext/autosummary/generate.py +270 -154
- sphinx/ext/coverage.py +108 -18
- sphinx/ext/duration.py +10 -3
- sphinx/ext/extlinks.py +3 -2
- sphinx/ext/graphviz.py +3 -3
- sphinx/ext/ifconfig.py +1 -2
- sphinx/ext/imgconverter.py +1 -0
- sphinx/ext/imgmath.py +7 -6
- sphinx/ext/inheritance_diagram.py +3 -3
- sphinx/ext/intersphinx/__init__.py +81 -0
- sphinx/ext/intersphinx/__main__.py +10 -0
- sphinx/ext/intersphinx/_cli.py +44 -0
- sphinx/ext/intersphinx/_load.py +253 -0
- sphinx/ext/{intersphinx.py → intersphinx/_resolve.py} +17 -368
- sphinx/ext/intersphinx/_shared.py +53 -0
- sphinx/ext/mathjax.py +1 -1
- sphinx/ext/todo.py +2 -2
- sphinx/io.py +2 -6
- sphinx/locale/__init__.py +1 -5
- sphinx/locale/ar/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.po +678 -471
- sphinx/locale/bg/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bg/LC_MESSAGES/sphinx.po +684 -476
- sphinx/locale/bn/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bn/LC_MESSAGES/sphinx.po +679 -472
- sphinx/locale/ca/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ca/LC_MESSAGES/sphinx.po +681 -474
- sphinx/locale/cak/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cak/LC_MESSAGES/sphinx.po +678 -471
- sphinx/locale/cs/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cs/LC_MESSAGES/sphinx.po +679 -472
- sphinx/locale/cy/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cy/LC_MESSAGES/sphinx.po +679 -472
- sphinx/locale/da/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/da/LC_MESSAGES/sphinx.po +679 -472
- sphinx/locale/de/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de/LC_MESSAGES/sphinx.po +679 -472
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +678 -471
- sphinx/locale/el/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/el/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/eo/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eo/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/es/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/et/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/et/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/eu/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eu/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/fa/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fa/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/fi/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fi/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/fr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr/LC_MESSAGES/sphinx.po +725 -518
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/gl/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/gl/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/he/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/he/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/hi/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/hr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hr/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/hu/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hu/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/id/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/id/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/is/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/is/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/it/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/it/LC_MESSAGES/sphinx.po +708 -500
- sphinx/locale/ja/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ja/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/ka/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ka/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/ko/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ko/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/lt/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lt/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/lv/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lv/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/mk/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/mk/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/ne/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ne/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/nl/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nl/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/pl/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pl/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/pt/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +705 -498
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/ro/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ro/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/ru/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ru/LC_MESSAGES/sphinx.po +890 -680
- sphinx/locale/si/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/si/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/sk/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sk/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/sl/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sl/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/sphinx.pot +702 -494
- sphinx/locale/sq/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sq/LC_MESSAGES/sphinx.po +704 -497
- sphinx/locale/sr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr_RS/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/ta/LC_MESSAGES/sphinx.po +1016 -808
- sphinx/locale/te/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/te/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/tr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/tr/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/ur/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ur/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/vi/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/vi/LC_MESSAGES/sphinx.po +701 -494
- sphinx/locale/yue/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/yue/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +704 -496
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +700 -493
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +729 -522
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +700 -493
- sphinx/roles.py +1 -1
- sphinx/search/__init__.py +17 -9
- sphinx/templates/quickstart/{root_doc.rst_t → root_doc.rst.jinja} +7 -10
- sphinx/testing/fixtures.py +22 -20
- sphinx/testing/path.py +6 -2
- sphinx/testing/util.py +8 -13
- sphinx/texinputs/sphinx.sty +449 -332
- sphinx/texinputs/sphinxlatexadmonitions.sty +209 -66
- sphinx/texinputs/sphinxlatexliterals.sty +9 -16
- sphinx/texinputs/sphinxlatexstyletext.sty +4 -38
- sphinx/texinputs/sphinxlatextables.sty +6 -14
- sphinx/texinputs/sphinxpackageboxes.sty +15 -42
- sphinx/texinputs/sphinxpackagefootnote.sty +4 -3
- sphinx/themes/agogo/layout.html +3 -3
- sphinx/themes/basic/genindex-single.html +2 -1
- sphinx/themes/basic/layout.html +3 -6
- sphinx/themes/basic/static/searchtools.js +4 -3
- sphinx/themes/haiku/layout.html +4 -4
- sphinx/themes/pyramid/layout.html +1 -1
- sphinx/themes/scrolls/layout.html +2 -2
- sphinx/theming.py +3 -3
- sphinx/transforms/__init__.py +34 -20
- sphinx/transforms/i18n.py +8 -7
- sphinx/transforms/post_transforms/__init__.py +1 -1
- sphinx/transforms/post_transforms/images.py +7 -10
- sphinx/util/_pathlib.py +2 -2
- sphinx/util/cfamily.py +52 -30
- sphinx/util/console.py +1 -1
- sphinx/util/display.py +16 -11
- sphinx/util/docutils.py +88 -40
- sphinx/util/fileutil.py +15 -3
- sphinx/util/images.py +1 -0
- sphinx/util/inspect.py +66 -22
- sphinx/util/inventory.py +15 -0
- sphinx/util/logging.py +14 -21
- sphinx/util/math.py +3 -1
- sphinx/util/nodes.py +9 -12
- sphinx/util/osutil.py +5 -5
- sphinx/util/parsing.py +93 -0
- sphinx/util/tags.py +71 -47
- sphinx/util/typing.py +265 -143
- sphinx/versioning.py +17 -17
- sphinx/writers/html5.py +26 -19
- sphinx/writers/latex.py +60 -30
- sphinx/writers/manpage.py +4 -3
- sphinx/writers/texinfo.py +19 -14
- {sphinx-7.3.7.dist-info → sphinx-7.4.1.dist-info}/METADATA +21 -20
- sphinx-7.4.1.dist-info/RECORD +591 -0
- sphinx-7.3.7.dist-info/RECORD +0 -581
- /sphinx/templates/apidoc/{module.rst_t → module.rst.jinja} +0 -0
- /sphinx/templates/apidoc/{package.rst_t → package.rst.jinja} +0 -0
- /sphinx/templates/apidoc/{toc.rst_t → toc.rst.jinja} +0 -0
- /sphinx/templates/epub3/{content.opf_t → content.opf.jinja} +0 -0
- /sphinx/templates/epub3/{nav.xhtml_t → nav.xhtml.jinja} +0 -0
- /sphinx/templates/epub3/{toc.ncx_t → toc.ncx.jinja} +0 -0
- /sphinx/templates/gettext/{message.pot_t → message.pot.jinja} +0 -0
- /sphinx/templates/imgmath/{preview.tex_t → preview.tex.jinja} +0 -0
- /sphinx/templates/imgmath/{template.tex_t → template.tex.jinja} +0 -0
- /sphinx/templates/latex/{latex.tex_t → latex.tex.jinja} +0 -0
- /sphinx/templates/latex/{longtable.tex_t → longtable.tex.jinja} +0 -0
- /sphinx/templates/latex/{sphinxmessages.sty_t → sphinxmessages.sty.jinja} +0 -0
- /sphinx/templates/latex/{tabular.tex_t → tabular.tex.jinja} +0 -0
- /sphinx/templates/latex/{tabulary.tex_t → tabulary.tex.jinja} +0 -0
- /sphinx/templates/quickstart/{Makefile_t → Makefile.jinja} +0 -0
- /sphinx/templates/quickstart/{Makefile.new_t → Makefile.new.jinja} +0 -0
- /sphinx/templates/quickstart/{conf.py_t → conf.py.jinja} +0 -0
- /sphinx/templates/quickstart/{make.bat_t → make.bat.jinja} +0 -0
- /sphinx/templates/quickstart/{make.bat.new_t → make.bat.new.jinja} +0 -0
- /sphinx/texinputs/{Makefile_t → Makefile.jinja} +0 -0
- /sphinx/texinputs/{latexmkjarc_t → latexmkjarc.jinja} +0 -0
- /sphinx/texinputs/{latexmkrc_t → latexmkrc.jinja} +0 -0
- /sphinx/texinputs/{make.bat_t → make.bat.jinja} +0 -0
- /sphinx/texinputs_win/{Makefile_t → Makefile.jinja} +0 -0
- /sphinx/themes/agogo/static/{agogo.css_t → agogo.css.jinja} +0 -0
- /sphinx/themes/basic/static/{basic.css_t → basic.css.jinja} +0 -0
- /sphinx/themes/basic/static/{documentation_options.js_t → documentation_options.js.jinja} +0 -0
- /sphinx/themes/basic/static/{language_data.js_t → language_data.js.jinja} +0 -0
- /sphinx/themes/bizstyle/static/{bizstyle.css_t → bizstyle.css.jinja} +0 -0
- /sphinx/themes/bizstyle/static/{bizstyle.js_t → bizstyle.js.jinja} +0 -0
- /sphinx/themes/classic/static/{classic.css_t → classic.css.jinja} +0 -0
- /sphinx/themes/classic/static/{sidebar.js_t → sidebar.js.jinja} +0 -0
- /sphinx/themes/epub/static/{epub.css_t → epub.css.jinja} +0 -0
- /sphinx/themes/haiku/static/{haiku.css_t → haiku.css.jinja} +0 -0
- /sphinx/themes/nature/static/{nature.css_t → nature.css.jinja} +0 -0
- /sphinx/themes/nonav/static/{nonav.css_t → nonav.css.jinja} +0 -0
- /sphinx/themes/pyramid/static/{epub.css_t → epub.css.jinja} +0 -0
- /sphinx/themes/pyramid/static/{pyramid.css_t → pyramid.css.jinja} +0 -0
- /sphinx/themes/scrolls/static/{scrolls.css_t → scrolls.css.jinja} +0 -0
- /sphinx/themes/sphinxdoc/static/{sphinxdoc.css_t → sphinxdoc.css.jinja} +0 -0
- /sphinx/themes/traditional/static/{traditional.css_t → traditional.css.jinja} +0 -0
- {sphinx-7.3.7.dist-info → sphinx-7.4.1.dist-info}/LICENSE.rst +0 -0
- {sphinx-7.3.7.dist-info → sphinx-7.4.1.dist-info}/WHEEL +0 -0
- {sphinx-7.3.7.dist-info → sphinx-7.4.1.dist-info}/entry_points.txt +0 -0
sphinx/roles.py
CHANGED
|
@@ -374,7 +374,7 @@ class Manpage(ReferenceRole):
|
|
|
374
374
|
inner: nodes.Node
|
|
375
375
|
text = self.title[1:] if self.disabled else self.title
|
|
376
376
|
if not self.disabled and self.config.manpages_url:
|
|
377
|
-
uri = self.config.manpages_url.
|
|
377
|
+
uri = self.config.manpages_url.format_map(info)
|
|
378
378
|
inner = nodes.reference('', text, classes=[self.name], refuri=uri)
|
|
379
379
|
else:
|
|
380
380
|
inner = nodes.Text(text)
|
sphinx/search/__init__.py
CHANGED
|
@@ -52,11 +52,11 @@ class SearchLanguage:
|
|
|
52
52
|
This class is used to preprocess search word which Sphinx HTML readers
|
|
53
53
|
type, before searching index. Default implementation does nothing.
|
|
54
54
|
"""
|
|
55
|
-
lang: str
|
|
56
|
-
language_name: str
|
|
55
|
+
lang: str = ''
|
|
56
|
+
language_name: str = ''
|
|
57
57
|
stopwords: set[str] = set()
|
|
58
58
|
js_splitter_code: str = ""
|
|
59
|
-
js_stemmer_rawcode: str
|
|
59
|
+
js_stemmer_rawcode: str = ''
|
|
60
60
|
js_stemmer_code = """
|
|
61
61
|
/**
|
|
62
62
|
* Dummy stemmer for languages without stemming rules.
|
|
@@ -198,7 +198,7 @@ def _is_meta_keywords(
|
|
|
198
198
|
@dataclasses.dataclass
|
|
199
199
|
class WordStore:
|
|
200
200
|
words: list[str] = dataclasses.field(default_factory=list)
|
|
201
|
-
titles: list[tuple[str, str]] = dataclasses.field(default_factory=list)
|
|
201
|
+
titles: list[tuple[str, str | None]] = dataclasses.field(default_factory=list)
|
|
202
202
|
title_words: list[str] = dataclasses.field(default_factory=list)
|
|
203
203
|
|
|
204
204
|
|
|
@@ -253,7 +253,7 @@ class IndexBuilder:
|
|
|
253
253
|
def __init__(self, env: BuildEnvironment, lang: str, options: dict[str, str], scoring: str) -> None:
|
|
254
254
|
self.env = env
|
|
255
255
|
# docname -> title
|
|
256
|
-
self._titles: dict[str, str] = env._search_index_titles
|
|
256
|
+
self._titles: dict[str, str | None] = env._search_index_titles
|
|
257
257
|
# docname -> filename
|
|
258
258
|
self._filenames: dict[str, str] = env._search_index_filenames
|
|
259
259
|
# stemmed words -> set(docname)
|
|
@@ -261,7 +261,7 @@ class IndexBuilder:
|
|
|
261
261
|
# stemmed words in titles -> set(docname)
|
|
262
262
|
self._title_mapping: dict[str, set[str]] = env._search_index_title_mapping
|
|
263
263
|
# docname -> all titles in document
|
|
264
|
-
self._all_titles: dict[str, list[tuple[str, str]]] = env._search_index_all_titles
|
|
264
|
+
self._all_titles: dict[str, list[tuple[str, str | None]]] = env._search_index_all_titles
|
|
265
265
|
# docname -> list(index entry)
|
|
266
266
|
self._index_entries: dict[str, list[tuple[str, str, str]]] = env._search_index_index_entries
|
|
267
267
|
# objtype -> index
|
|
@@ -369,6 +369,13 @@ class IndexBuilder:
|
|
|
369
369
|
return rv
|
|
370
370
|
|
|
371
371
|
def get_terms(self, fn2index: dict[str, int]) -> tuple[dict[str, list[int] | int], dict[str, list[int] | int]]:
|
|
372
|
+
"""
|
|
373
|
+
Return a mapping of document and title terms to their corresponding sorted document IDs.
|
|
374
|
+
|
|
375
|
+
When a term is only found within a single document, then the value for that term will be
|
|
376
|
+
an integer value. When a term is found within multiple documents, the value will be a list
|
|
377
|
+
of integers.
|
|
378
|
+
"""
|
|
372
379
|
rvs: tuple[dict[str, list[int] | int], dict[str, list[int] | int]] = ({}, {})
|
|
373
380
|
for rv, mapping in zip(rvs, (self._mapping, self._title_mapping)):
|
|
374
381
|
for k, v in mapping.items():
|
|
@@ -391,7 +398,7 @@ class IndexBuilder:
|
|
|
391
398
|
objtypes = {v: k[0] + ':' + k[1] for (k, v) in self._objtypes.items()}
|
|
392
399
|
objnames = self._objnames
|
|
393
400
|
|
|
394
|
-
alltitles: dict[str, list[tuple[int, str]]] = {}
|
|
401
|
+
alltitles: dict[str, list[tuple[int, str | None]]] = {}
|
|
395
402
|
for docname, titlelist in sorted(self._all_titles.items()):
|
|
396
403
|
for title, titleid in titlelist:
|
|
397
404
|
alltitles.setdefault(title, []).append((fn2index[docname], titleid))
|
|
@@ -502,9 +509,10 @@ class IndexBuilder:
|
|
|
502
509
|
elif isinstance(node, nodes.Text):
|
|
503
510
|
word_store.words.extend(split(node.astext()))
|
|
504
511
|
elif isinstance(node, nodes.title):
|
|
505
|
-
title = node.astext()
|
|
512
|
+
title, is_main_title = node.astext(), len(word_store.titles) == 0
|
|
506
513
|
ids = node.parent['ids']
|
|
507
|
-
|
|
514
|
+
title_node_id = None if is_main_title else ids[0] if ids else None
|
|
515
|
+
word_store.titles.append((title, title_node_id))
|
|
508
516
|
word_store.title_words.extend(split(title))
|
|
509
517
|
for child in node.children:
|
|
510
518
|
_visit_nodes(child)
|
|
@@ -3,19 +3,16 @@
|
|
|
3
3
|
You can adapt this file completely to your liking, but it should at least
|
|
4
4
|
contain the root `toctree` directive.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
{{ project }} documentation
|
|
7
|
+
{{ project_underline }}==============
|
|
8
|
+
|
|
9
|
+
Add your content using ``reStructuredText`` syntax. See the
|
|
10
|
+
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
|
|
11
|
+
documentation for details.
|
|
12
|
+
|
|
8
13
|
|
|
9
14
|
.. toctree::
|
|
10
15
|
:maxdepth: {{ mastertocmaxdepth }}
|
|
11
16
|
:caption: Contents:
|
|
12
17
|
|
|
13
18
|
{{ mastertoctree }}
|
|
14
|
-
|
|
15
|
-
Indices and tables
|
|
16
|
-
==================
|
|
17
|
-
|
|
18
|
-
* :ref:`genindex`
|
|
19
|
-
* :ref:`modindex`
|
|
20
|
-
* :ref:`search`
|
|
21
|
-
|
sphinx/testing/fixtures.py
CHANGED
|
@@ -68,10 +68,10 @@ class SharedResult:
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
@pytest.fixture
|
|
71
|
+
@pytest.fixture
|
|
72
72
|
def app_params(
|
|
73
73
|
request: Any,
|
|
74
|
-
test_params: dict,
|
|
74
|
+
test_params: dict[str, Any],
|
|
75
75
|
shared_result: SharedResult,
|
|
76
76
|
sphinx_test_tempdir: str,
|
|
77
77
|
rootdir: str,
|
|
@@ -117,8 +117,8 @@ def app_params(
|
|
|
117
117
|
_app_params = namedtuple('_app_params', 'args,kwargs')
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
@pytest.fixture
|
|
121
|
-
def test_params(request: Any) -> dict:
|
|
120
|
+
@pytest.fixture
|
|
121
|
+
def test_params(request: Any) -> dict[str, Any]:
|
|
122
122
|
"""
|
|
123
123
|
Test parameters that are specified by 'pytest.mark.test_params'
|
|
124
124
|
|
|
@@ -141,11 +141,11 @@ def test_params(request: Any) -> dict:
|
|
|
141
141
|
return result
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
@pytest.fixture
|
|
144
|
+
@pytest.fixture
|
|
145
145
|
def app(
|
|
146
|
-
test_params: dict,
|
|
147
|
-
app_params:
|
|
148
|
-
make_app: Callable,
|
|
146
|
+
test_params: dict[str, Any],
|
|
147
|
+
app_params: _app_params,
|
|
148
|
+
make_app: Callable[[], SphinxTestApp],
|
|
149
149
|
shared_result: SharedResult,
|
|
150
150
|
) -> Iterator[SphinxTestApp]:
|
|
151
151
|
"""
|
|
@@ -159,14 +159,14 @@ def app(
|
|
|
159
159
|
print('# builder:', app_.builder.name)
|
|
160
160
|
print('# srcdir:', app_.srcdir)
|
|
161
161
|
print('# outdir:', app_.outdir)
|
|
162
|
-
print('# status:', '\n' + app_.
|
|
163
|
-
print('# warning:', '\n' + app_.
|
|
162
|
+
print('# status:', '\n' + app_.status.getvalue())
|
|
163
|
+
print('# warning:', '\n' + app_.warning.getvalue())
|
|
164
164
|
|
|
165
165
|
if test_params['shared_result']:
|
|
166
166
|
shared_result.store(test_params['shared_result'], app_)
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
@pytest.fixture
|
|
169
|
+
@pytest.fixture
|
|
170
170
|
def status(app: SphinxTestApp) -> StringIO:
|
|
171
171
|
"""
|
|
172
172
|
Back-compatibility for testing with previous @with_app decorator
|
|
@@ -174,7 +174,7 @@ def status(app: SphinxTestApp) -> StringIO:
|
|
|
174
174
|
return app.status
|
|
175
175
|
|
|
176
176
|
|
|
177
|
-
@pytest.fixture
|
|
177
|
+
@pytest.fixture
|
|
178
178
|
def warning(app: SphinxTestApp) -> StringIO:
|
|
179
179
|
"""
|
|
180
180
|
Back-compatibility for testing with previous @with_app decorator
|
|
@@ -182,8 +182,8 @@ def warning(app: SphinxTestApp) -> StringIO:
|
|
|
182
182
|
return app.warning
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
@pytest.fixture
|
|
186
|
-
def make_app(test_params: dict,
|
|
185
|
+
@pytest.fixture
|
|
186
|
+
def make_app(test_params: dict[str, Any]) -> Iterator[Callable[[], SphinxTestApp]]:
|
|
187
187
|
"""
|
|
188
188
|
Provides make_app function to initialize SphinxTestApp instance.
|
|
189
189
|
if you want to initialize 'app' in your test function. please use this
|
|
@@ -196,10 +196,12 @@ def make_app(test_params: dict, monkeypatch: Any) -> Iterator[Callable]:
|
|
|
196
196
|
status, warning = StringIO(), StringIO()
|
|
197
197
|
kwargs.setdefault('status', status)
|
|
198
198
|
kwargs.setdefault('warning', warning)
|
|
199
|
-
app_:
|
|
200
|
-
apps.append(app_)
|
|
199
|
+
app_: SphinxTestApp
|
|
201
200
|
if test_params['shared_result']:
|
|
202
|
-
app_ = SphinxTestAppWrapperForSkipBuilding(
|
|
201
|
+
app_ = SphinxTestAppWrapperForSkipBuilding(*args, **kwargs)
|
|
202
|
+
else:
|
|
203
|
+
app_ = SphinxTestApp(*args, **kwargs)
|
|
204
|
+
apps.append(app_)
|
|
203
205
|
return app_
|
|
204
206
|
yield make
|
|
205
207
|
|
|
@@ -208,7 +210,7 @@ def make_app(test_params: dict, monkeypatch: Any) -> Iterator[Callable]:
|
|
|
208
210
|
app_.cleanup()
|
|
209
211
|
|
|
210
212
|
|
|
211
|
-
@pytest.fixture
|
|
213
|
+
@pytest.fixture
|
|
212
214
|
def shared_result() -> SharedResult:
|
|
213
215
|
return SharedResult()
|
|
214
216
|
|
|
@@ -218,7 +220,7 @@ def _shared_result_cache() -> None:
|
|
|
218
220
|
SharedResult.cache.clear()
|
|
219
221
|
|
|
220
222
|
|
|
221
|
-
@pytest.fixture
|
|
223
|
+
@pytest.fixture
|
|
222
224
|
def if_graphviz_found(app: SphinxTestApp) -> None: # NoQA: PT004
|
|
223
225
|
"""
|
|
224
226
|
The test will be skipped when using 'if_graphviz_found' fixture and graphviz
|
|
@@ -242,7 +244,7 @@ def sphinx_test_tempdir(tmp_path_factory: Any) -> Path:
|
|
|
242
244
|
return tmp_path_factory.getbasetemp()
|
|
243
245
|
|
|
244
246
|
|
|
245
|
-
@pytest.fixture
|
|
247
|
+
@pytest.fixture
|
|
246
248
|
def rollback_sysmodules() -> Iterator[None]: # NoQA: PT004
|
|
247
249
|
"""
|
|
248
250
|
Rollback sys.modules to its value before testing to unload modules
|
sphinx/testing/path.py
CHANGED
|
@@ -82,7 +82,11 @@ class path(str):
|
|
|
82
82
|
"""
|
|
83
83
|
return os.path.ismount(self)
|
|
84
84
|
|
|
85
|
-
def rmtree(
|
|
85
|
+
def rmtree(
|
|
86
|
+
self,
|
|
87
|
+
ignore_errors: bool = False,
|
|
88
|
+
onerror: Callable[[Callable[..., Any], str, Any], object] | None = None,
|
|
89
|
+
) -> None:
|
|
86
90
|
"""
|
|
87
91
|
Removes the file or directory and any files or directories it may
|
|
88
92
|
contain.
|
|
@@ -149,7 +153,7 @@ class path(str):
|
|
|
149
153
|
def utime(self, arg: Any) -> None:
|
|
150
154
|
os.utime(self, arg)
|
|
151
155
|
|
|
152
|
-
def open(self, mode: str = 'r', **kwargs: Any) -> IO:
|
|
156
|
+
def open(self, mode: str = 'r', **kwargs: Any) -> IO[str]:
|
|
153
157
|
return open(self, mode, **kwargs) # NoQA: SIM115
|
|
154
158
|
|
|
155
159
|
def write_text(self, text: str, encoding: str = 'utf-8', **kwargs: Any) -> None:
|
sphinx/testing/util.py
CHANGED
|
@@ -11,7 +11,6 @@ from io import StringIO
|
|
|
11
11
|
from types import MappingProxyType
|
|
12
12
|
from typing import TYPE_CHECKING
|
|
13
13
|
|
|
14
|
-
from defusedxml.ElementTree import parse as xml_parse
|
|
15
14
|
from docutils import nodes
|
|
16
15
|
from docutils.parsers.rst import directives, roles
|
|
17
16
|
|
|
@@ -22,7 +21,7 @@ from sphinx.util.console import strip_colors
|
|
|
22
21
|
from sphinx.util.docutils import additional_nodes
|
|
23
22
|
|
|
24
23
|
if TYPE_CHECKING:
|
|
25
|
-
from collections.abc import Mapping
|
|
24
|
+
from collections.abc import Mapping, Sequence
|
|
26
25
|
from pathlib import Path
|
|
27
26
|
from typing import Any
|
|
28
27
|
from xml.etree.ElementTree import ElementTree
|
|
@@ -73,6 +72,8 @@ def assert_node(node: Node, cls: Any = None, xpath: str = "", **kwargs: Any) ->
|
|
|
73
72
|
# keep this to restrict the API usage and to have a correct return type
|
|
74
73
|
def etree_parse(path: str | os.PathLike[str]) -> ElementTree:
|
|
75
74
|
"""Parse a file into a (safe) XML element tree."""
|
|
75
|
+
from defusedxml.ElementTree import parse as xml_parse
|
|
76
|
+
|
|
76
77
|
return xml_parse(path)
|
|
77
78
|
|
|
78
79
|
|
|
@@ -111,7 +112,7 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
111
112
|
confoverrides: dict[str, Any] | None = None,
|
|
112
113
|
status: StringIO | None = None,
|
|
113
114
|
warning: StringIO | None = None,
|
|
114
|
-
tags:
|
|
115
|
+
tags: Sequence[str] = (),
|
|
115
116
|
docutils_conf: str | None = None, # extra constructor argument
|
|
116
117
|
parallel: int = 0,
|
|
117
118
|
# additional arguments at the end to keep the signature
|
|
@@ -204,23 +205,17 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
204
205
|
super().build(force_all, filenames)
|
|
205
206
|
|
|
206
207
|
|
|
207
|
-
class SphinxTestAppWrapperForSkipBuilding:
|
|
208
|
+
class SphinxTestAppWrapperForSkipBuilding(SphinxTestApp):
|
|
208
209
|
"""A wrapper for SphinxTestApp.
|
|
209
210
|
|
|
210
211
|
This class is used to speed up the test by skipping ``app.build()``
|
|
211
212
|
if it has already been built and there are any output files.
|
|
212
213
|
"""
|
|
213
214
|
|
|
214
|
-
def
|
|
215
|
-
self.
|
|
216
|
-
|
|
217
|
-
def __getattr__(self, name: str) -> Any:
|
|
218
|
-
return getattr(self.app, name)
|
|
219
|
-
|
|
220
|
-
def build(self, *args: Any, **kwargs: Any) -> None:
|
|
221
|
-
if not os.listdir(self.app.outdir):
|
|
215
|
+
def build(self, force_all: bool = False, filenames: list[str] | None = None) -> None:
|
|
216
|
+
if not os.listdir(self.outdir):
|
|
222
217
|
# if listdir is empty, do build.
|
|
223
|
-
|
|
218
|
+
super().build(force_all, filenames)
|
|
224
219
|
# otherwise, we can use built cache
|
|
225
220
|
|
|
226
221
|
|