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/ext/autodoc/__init__.py
CHANGED
|
@@ -170,7 +170,7 @@ def merge_members_option(options: dict) -> None:
|
|
|
170
170
|
return
|
|
171
171
|
|
|
172
172
|
members = options.setdefault('members', [])
|
|
173
|
-
for key in
|
|
173
|
+
for key in ('private-members', 'special-members'):
|
|
174
174
|
if key in options and options[key] not in (ALL, None):
|
|
175
175
|
for member in options[key]:
|
|
176
176
|
if member not in members:
|
|
@@ -396,7 +396,7 @@ class Documenter:
|
|
|
396
396
|
# an autogenerated one
|
|
397
397
|
matched = py_ext_sig_re.match(self.name)
|
|
398
398
|
if matched is None:
|
|
399
|
-
logger.warning(__('invalid signature for auto%s (%r)')
|
|
399
|
+
logger.warning(__('invalid signature for auto%s (%r)'), self.objtype, self.name,
|
|
400
400
|
type='autodoc')
|
|
401
401
|
return False
|
|
402
402
|
explicit_modname, path, base, tp_list, args, retann = matched.groups()
|
|
@@ -892,7 +892,7 @@ class Documenter:
|
|
|
892
892
|
logger.warning(
|
|
893
893
|
__("don't know which module to import for autodocumenting "
|
|
894
894
|
'%r (try placing a "module" or "currentmodule" directive '
|
|
895
|
-
'in the document, or giving an explicit module name)')
|
|
895
|
+
'in the document, or giving an explicit module name)'),
|
|
896
896
|
self.name, type='autodoc')
|
|
897
897
|
return
|
|
898
898
|
|
|
@@ -1024,7 +1024,7 @@ class ModuleDocumenter(Documenter):
|
|
|
1024
1024
|
ret = super().parse_name()
|
|
1025
1025
|
if self.args or self.retann:
|
|
1026
1026
|
logger.warning(__('signature arguments or return annotation '
|
|
1027
|
-
'given for automodule %s')
|
|
1027
|
+
'given for automodule %s'), self.fullname,
|
|
1028
1028
|
type='autodoc')
|
|
1029
1029
|
return ret
|
|
1030
1030
|
|
|
@@ -1037,8 +1037,8 @@ class ModuleDocumenter(Documenter):
|
|
|
1037
1037
|
except ValueError as exc:
|
|
1038
1038
|
# invalid __all__ found.
|
|
1039
1039
|
logger.warning(__('__all__ should be a list of strings, not %r '
|
|
1040
|
-
'(in module %s) -- ignoring __all__')
|
|
1041
|
-
|
|
1040
|
+
'(in module %s) -- ignoring __all__'),
|
|
1041
|
+
exc.args[0], self.fullname, type='autodoc')
|
|
1042
1042
|
|
|
1043
1043
|
return ret
|
|
1044
1044
|
|
|
@@ -1103,8 +1103,8 @@ class ModuleDocumenter(Documenter):
|
|
|
1103
1103
|
ret.append(members[name])
|
|
1104
1104
|
else:
|
|
1105
1105
|
logger.warning(__('missing attribute mentioned in :members: option: '
|
|
1106
|
-
'module %s, attribute %s')
|
|
1107
|
-
|
|
1106
|
+
'module %s, attribute %s'),
|
|
1107
|
+
safe_getattr(self.object, '__name__', '???', name),
|
|
1108
1108
|
type='autodoc')
|
|
1109
1109
|
return False, ret
|
|
1110
1110
|
|
|
@@ -1756,8 +1756,8 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # type:
|
|
|
1756
1756
|
if name in members:
|
|
1757
1757
|
selected.append(members[name])
|
|
1758
1758
|
else:
|
|
1759
|
-
logger.warning(__('missing attribute %s in object %s')
|
|
1760
|
-
|
|
1759
|
+
logger.warning(__('missing attribute %s in object %s'),
|
|
1760
|
+
name, self.fullname, type='autodoc')
|
|
1761
1761
|
return False, selected
|
|
1762
1762
|
elif self.options.inherited_members:
|
|
1763
1763
|
return False, list(members.values())
|
|
@@ -2721,10 +2721,10 @@ class AttributeDocumenter(GenericAliasMixin, SlotsMixin, # type: ignore[misc]
|
|
|
2721
2721
|
# a docstring from the value which descriptor returns unexpectedly.
|
|
2722
2722
|
# ref: https://github.com/sphinx-doc/sphinx/issues/7805
|
|
2723
2723
|
orig = self.config.autodoc_inherit_docstrings
|
|
2724
|
-
self.config.autodoc_inherit_docstrings = False
|
|
2724
|
+
self.config.autodoc_inherit_docstrings = False
|
|
2725
2725
|
return super().get_doc()
|
|
2726
2726
|
finally:
|
|
2727
|
-
self.config.autodoc_inherit_docstrings = orig
|
|
2727
|
+
self.config.autodoc_inherit_docstrings = orig
|
|
2728
2728
|
|
|
2729
2729
|
def add_content(self, more_content: StringList | None) -> None:
|
|
2730
2730
|
# Disable analyzing attribute comment on Documenter.add_content() to control it on
|
|
@@ -2773,7 +2773,7 @@ class PropertyDocumenter(DocstringStripSignatureMixin, # type: ignore[misc]
|
|
|
2773
2773
|
obj = __dict__.get(self.objpath[-1])
|
|
2774
2774
|
if isinstance(obj, classmethod) and inspect.isproperty(obj.__func__):
|
|
2775
2775
|
self.object = obj.__func__
|
|
2776
|
-
self.isclassmethod = True
|
|
2776
|
+
self.isclassmethod: bool = True
|
|
2777
2777
|
return True
|
|
2778
2778
|
else:
|
|
2779
2779
|
return False
|
sphinx/ext/autodoc/directive.py
CHANGED
|
@@ -9,10 +9,10 @@ from docutils.utils import Reporter, assemble_option_dict
|
|
|
9
9
|
from sphinx.ext.autodoc import Documenter, Options
|
|
10
10
|
from sphinx.util import logging
|
|
11
11
|
from sphinx.util.docutils import SphinxDirective, switch_source_input
|
|
12
|
-
from sphinx.util.
|
|
12
|
+
from sphinx.util.parsing import nested_parse_to_nodes
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
15
|
-
from docutils.nodes import
|
|
15
|
+
from docutils.nodes import Node
|
|
16
16
|
from docutils.parsers.rst.states import RSTState
|
|
17
17
|
|
|
18
18
|
from sphinx.config import Config
|
|
@@ -86,15 +86,12 @@ def parse_generated_content(state: RSTState, content: StringList, documenter: Do
|
|
|
86
86
|
"""Parse an item of content generated by Documenter."""
|
|
87
87
|
with switch_source_input(state, content):
|
|
88
88
|
if documenter.titles_allowed:
|
|
89
|
-
|
|
90
|
-
# necessary so that the child nodes get the right source/line set
|
|
91
|
-
node.document = state.document
|
|
92
|
-
nested_parse_with_titles(state, content, node)
|
|
93
|
-
else:
|
|
94
|
-
node = nodes.paragraph()
|
|
95
|
-
node.document = state.document
|
|
96
|
-
state.nested_parse(content, 0, node)
|
|
89
|
+
return nested_parse_to_nodes(state, content)
|
|
97
90
|
|
|
91
|
+
node = nodes.paragraph()
|
|
92
|
+
# necessary so that the child nodes get the right source/line set
|
|
93
|
+
node.document = state.document
|
|
94
|
+
state.nested_parse(content, 0, node, match_titles=False)
|
|
98
95
|
return node.children
|
|
99
96
|
|
|
100
97
|
|
|
@@ -115,7 +112,7 @@ class AutodocDirective(SphinxDirective):
|
|
|
115
112
|
reporter = self.state.document.reporter
|
|
116
113
|
|
|
117
114
|
try:
|
|
118
|
-
source, lineno = reporter.get_source_and_line(
|
|
115
|
+
source, lineno = reporter.get_source_and_line( # type: ignore[attr-defined]
|
|
119
116
|
self.lineno)
|
|
120
117
|
except AttributeError:
|
|
121
118
|
source, lineno = (None, None)
|
|
@@ -130,8 +127,8 @@ class AutodocDirective(SphinxDirective):
|
|
|
130
127
|
documenter_options = process_documenter_options(doccls, self.config, self.options)
|
|
131
128
|
except (KeyError, ValueError, TypeError) as exc:
|
|
132
129
|
# an option is either unknown or has a wrong type
|
|
133
|
-
logger.error('An option to %s is either unknown or has an invalid value: %s'
|
|
134
|
-
|
|
130
|
+
logger.error('An option to %s is either unknown or has an invalid value: %s',
|
|
131
|
+
self.name, exc, location=(self.env.docname, lineno))
|
|
135
132
|
return []
|
|
136
133
|
|
|
137
134
|
# generate the output
|
sphinx/ext/autodoc/mock.py
CHANGED
|
@@ -8,13 +8,16 @@ import sys
|
|
|
8
8
|
from importlib.abc import Loader, MetaPathFinder
|
|
9
9
|
from importlib.machinery import ModuleSpec
|
|
10
10
|
from types import MethodType, ModuleType
|
|
11
|
-
from typing import TYPE_CHECKING
|
|
11
|
+
from typing import TYPE_CHECKING
|
|
12
12
|
|
|
13
13
|
from sphinx.util import logging
|
|
14
14
|
from sphinx.util.inspect import isboundmethod, safe_getattr
|
|
15
15
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
17
|
from collections.abc import Iterator, Sequence
|
|
18
|
+
from typing import Any
|
|
19
|
+
|
|
20
|
+
from typing_extensions import TypeIs
|
|
18
21
|
|
|
19
22
|
logger = logging.getLogger(__name__)
|
|
20
23
|
|
|
@@ -46,10 +49,10 @@ class _MockObject:
|
|
|
46
49
|
def __contains__(self, key: str) -> bool:
|
|
47
50
|
return False
|
|
48
51
|
|
|
49
|
-
def __iter__(self) -> Iterator:
|
|
50
|
-
return iter(
|
|
52
|
+
def __iter__(self) -> Iterator[Any]:
|
|
53
|
+
return iter(())
|
|
51
54
|
|
|
52
|
-
def __mro_entries__(self, bases: tuple) -> tuple:
|
|
55
|
+
def __mro_entries__(self, bases: tuple[Any, ...]) -> tuple[type, ...]:
|
|
53
56
|
return (self.__class__,)
|
|
54
57
|
|
|
55
58
|
def __getitem__(self, key: Any) -> _MockObject:
|
|
@@ -68,7 +71,7 @@ class _MockObject:
|
|
|
68
71
|
|
|
69
72
|
|
|
70
73
|
def _make_subclass(name: str, module: str, superclass: Any = _MockObject,
|
|
71
|
-
attributes: Any = None, decorator_args: tuple = ()) -> Any:
|
|
74
|
+
attributes: Any = None, decorator_args: tuple[Any, ...] = ()) -> Any:
|
|
72
75
|
attrs = {'__module__': module,
|
|
73
76
|
'__display_name__': module + '.' + name,
|
|
74
77
|
'__name__': name,
|
|
@@ -144,8 +147,8 @@ def mock(modnames: list[str]) -> Iterator[None]:
|
|
|
144
147
|
# mock modules are enabled here
|
|
145
148
|
...
|
|
146
149
|
"""
|
|
150
|
+
finder = MockFinder(modnames)
|
|
147
151
|
try:
|
|
148
|
-
finder = MockFinder(modnames)
|
|
149
152
|
sys.meta_path.insert(0, finder)
|
|
150
153
|
yield
|
|
151
154
|
finally:
|
|
@@ -153,7 +156,7 @@ def mock(modnames: list[str]) -> Iterator[None]:
|
|
|
153
156
|
finder.invalidate_caches()
|
|
154
157
|
|
|
155
158
|
|
|
156
|
-
def ismockmodule(subject: Any) ->
|
|
159
|
+
def ismockmodule(subject: Any) -> TypeIs[_MockModule]:
|
|
157
160
|
"""Check if the object is a mocked module."""
|
|
158
161
|
return isinstance(subject, _MockModule)
|
|
159
162
|
|
|
@@ -109,7 +109,7 @@ def _get_arguments_inner(x: Any, /) -> ast.arguments | None:
|
|
|
109
109
|
return None
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
def get_default_value(lines: list[str], position: ast.
|
|
112
|
+
def get_default_value(lines: list[str], position: ast.expr) -> str | None:
|
|
113
113
|
try:
|
|
114
114
|
if position.lineno == position.end_lineno:
|
|
115
115
|
line = lines[position.lineno - 1]
|
sphinx/ext/autodoc/typehints.py
CHANGED
|
@@ -35,9 +35,9 @@ def record_typehints(app: Sphinx, objtype: str, name: str, obj: Any,
|
|
|
35
35
|
sig = inspect.signature(obj, type_aliases=app.config.autodoc_type_aliases)
|
|
36
36
|
for param in sig.parameters.values():
|
|
37
37
|
if param.annotation is not param.empty:
|
|
38
|
-
annotation[param.name] = stringify_annotation(param.annotation, mode)
|
|
38
|
+
annotation[param.name] = stringify_annotation(param.annotation, mode) # type: ignore[arg-type]
|
|
39
39
|
if sig.return_annotation is not sig.empty:
|
|
40
|
-
annotation['return'] = stringify_annotation(sig.return_annotation, mode)
|
|
40
|
+
annotation['return'] = stringify_annotation(sig.return_annotation, mode) # type: ignore[arg-type]
|
|
41
41
|
except (TypeError, ValueError):
|
|
42
42
|
pass
|
|
43
43
|
|
|
@@ -87,6 +87,7 @@ from sphinx.util.docutils import (
|
|
|
87
87
|
)
|
|
88
88
|
from sphinx.util.inspect import getmro, signature_from_str
|
|
89
89
|
from sphinx.util.matching import Matcher
|
|
90
|
+
from sphinx.util.parsing import nested_parse_to_nodes
|
|
90
91
|
|
|
91
92
|
if TYPE_CHECKING:
|
|
92
93
|
from collections.abc import Sequence
|
|
@@ -406,16 +407,14 @@ class Autosummary(SphinxDirective):
|
|
|
406
407
|
row = nodes.row('')
|
|
407
408
|
source, line = self.state_machine.get_source_and_line()
|
|
408
409
|
for text in column_texts:
|
|
409
|
-
|
|
410
|
-
vl = StringList()
|
|
411
|
-
vl.append(text, '%s:%d:<autosummary>' % (source, line))
|
|
410
|
+
vl = StringList([text], f'{source}:{line}:<autosummary>')
|
|
412
411
|
with switch_source_input(self.state, vl):
|
|
413
|
-
self.state
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
412
|
+
col_nodes = nested_parse_to_nodes(self.state, vl,
|
|
413
|
+
allow_section_headings=False)
|
|
414
|
+
if col_nodes and isinstance(col_nodes[0], nodes.paragraph):
|
|
415
|
+
node = col_nodes[0]
|
|
416
|
+
else:
|
|
417
|
+
node = nodes.paragraph('')
|
|
419
418
|
row.append(nodes.entry('', node))
|
|
420
419
|
body.append(row)
|
|
421
420
|
|
|
@@ -640,6 +639,13 @@ def import_by_name(
|
|
|
640
639
|
tried = []
|
|
641
640
|
errors: list[ImportExceptionGroup] = []
|
|
642
641
|
for prefix in prefixes:
|
|
642
|
+
if prefix is not None and name.startswith(f'{prefix}.'):
|
|
643
|
+
# Catch and avoid module cycles (e.g., sphinx.ext.sphinx.ext...)
|
|
644
|
+
msg = __('Summarised items should not include the current module. '
|
|
645
|
+
'Replace %r with %r.')
|
|
646
|
+
logger.warning(msg, name, name.removeprefix(f'{prefix}.'),
|
|
647
|
+
type='autosummary', subtype='import_cycle')
|
|
648
|
+
continue
|
|
643
649
|
try:
|
|
644
650
|
if prefix:
|
|
645
651
|
prefixed_name = f'{prefix}.{name}'
|