Skip to content

Commit 463ac3d

Browse files
committed
Merge remote-tracking branch 'origin/master' into new-inline-parse-i18n-logic
2 parents 3d5441d + ac3f74a commit 463ac3d

File tree

31 files changed

+827
-444
lines changed

31 files changed

+827
-444
lines changed

.ruff.toml

Lines changed: 30 additions & 273 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ select = [
386386
# from .flake8
387387
"sphinx/*" = ["E241"]
388388

389+
# whitelist ``print`` for stdout messages
390+
"sphinx/_cli/__init__.py" = ["T201"]
391+
389392
# whitelist ``print`` for stdout messages
390393
"sphinx/cmd/build.py" = ["T201"]
391394
"sphinx/cmd/make_mode.py" = ["T201"]
@@ -435,282 +438,36 @@ forced-separate = [
435438
preview = true
436439
quote-style = "single"
437440
exclude = [
441+
"sphinx/_cli/*",
438442
"sphinx/addnodes.py",
439443
"sphinx/application.py",
440-
"sphinx/builders/gettext.py",
441-
"sphinx/builders/text.py",
442-
"sphinx/builders/linkcheck.py",
443-
"sphinx/builders/_epub_base.py",
444-
"sphinx/builders/dummy.py",
445-
"sphinx/builders/changes.py",
446-
"sphinx/builders/texinfo.py",
447-
"sphinx/builders/dirhtml.py",
448-
"sphinx/builders/__init__.py",
449-
"sphinx/builders/xml.py",
450-
"sphinx/builders/singlehtml.py",
451-
"sphinx/builders/epub3.py",
452-
"sphinx/builders/manpage.py",
453-
"sphinx/builders/latex/constants.py",
454-
"sphinx/builders/latex/__init__.py",
455-
"sphinx/builders/latex/theming.py",
456-
"sphinx/builders/latex/transforms.py",
457-
"sphinx/builders/latex/util.py",
458-
"sphinx/builders/latex/nodes.py",
459-
"sphinx/builders/html/_assets.py",
460-
"sphinx/builders/html/__init__.py",
461-
"sphinx/builders/html/transforms.py",
462-
"sphinx/cmd/quickstart.py",
463-
"sphinx/cmd/build.py",
464-
"sphinx/cmd/make_mode.py",
444+
"sphinx/builders/*",
445+
"sphinx/cmd/*",
465446
"sphinx/config.py",
466-
"sphinx/directives/__init__.py",
467-
"sphinx/directives/code.py",
468-
"sphinx/directives/patches.py",
469-
"sphinx/directives/other.py",
470-
"sphinx/domains/math.py",
471-
"sphinx/domains/changeset.py",
472-
"sphinx/domains/javascript.py",
473-
"sphinx/domains/__init__.py",
474-
"sphinx/domains/citation.py",
475-
"sphinx/domains/rst.py",
476-
"sphinx/domains/index.py",
477-
"sphinx/domains/std/__init__.py",
478-
"sphinx/domains/python/_annotations.py",
479-
"sphinx/domains/python/__init__.py",
480-
"sphinx/domains/python/_object.py",
481-
"sphinx/domains/cpp/_parser.py",
482-
"sphinx/domains/cpp/_ids.py",
483-
"sphinx/domains/cpp/__init__.py",
484-
"sphinx/domains/cpp/_symbol.py",
485-
"sphinx/domains/cpp/_ast.py",
486-
"sphinx/domains/c/_parser.py",
487-
"sphinx/domains/c/_ids.py",
488-
"sphinx/domains/c/__init__.py",
489-
"sphinx/domains/c/_symbol.py",
490-
"sphinx/domains/c/_ast.py",
491-
"sphinx/environment/__init__.py",
492-
"sphinx/environment/collectors/dependencies.py",
493-
"sphinx/environment/collectors/toctree.py",
494-
"sphinx/environment/collectors/metadata.py",
495-
"sphinx/environment/collectors/title.py",
496-
"sphinx/environment/collectors/asset.py",
497-
"sphinx/environment/collectors/__init__.py",
498-
"sphinx/environment/adapters/toctree.py",
499-
"sphinx/environment/adapters/indexentries.py",
500-
"sphinx/environment/adapters/asset.py",
501-
"sphinx/ext/extlinks.py",
502-
"sphinx/ext/todo.py",
503-
"sphinx/ext/mathjax.py",
504-
"sphinx/ext/doctest.py",
505-
"sphinx/ext/autosectionlabel.py",
506-
"sphinx/ext/intersphinx/__init__.py",
507-
"sphinx/ext/intersphinx/_cli.py",
508-
"sphinx/ext/intersphinx/_load.py",
509-
"sphinx/ext/intersphinx/_resolve.py",
510-
"sphinx/ext/duration.py",
511-
"sphinx/ext/imgconverter.py",
512-
"sphinx/ext/imgmath.py",
513-
"sphinx/ext/apidoc.py",
514-
"sphinx/ext/viewcode.py",
515-
"sphinx/ext/githubpages.py",
516-
"sphinx/ext/linkcode.py",
517-
"sphinx/ext/ifconfig.py",
518-
"sphinx/ext/inheritance_diagram.py",
519-
"sphinx/ext/coverage.py",
520-
"sphinx/ext/graphviz.py",
521-
"sphinx/ext/napoleon/docstring.py",
522-
"sphinx/ext/napoleon/__init__.py",
523-
"sphinx/ext/autodoc/typehints.py",
524-
"sphinx/ext/autodoc/preserve_defaults.py",
525-
"sphinx/ext/autodoc/__init__.py",
526-
"sphinx/ext/autodoc/directive.py",
527-
"sphinx/ext/autodoc/importer.py",
528-
"sphinx/ext/autodoc/type_comment.py",
529-
"sphinx/ext/autodoc/mock.py",
530-
"sphinx/ext/autosummary/__init__.py",
531-
"sphinx/ext/autosummary/generate.py",
532-
"sphinx/pycode/ast.py",
533-
"sphinx/pycode/__init__.py",
534-
"sphinx/pycode/parser.py",
447+
"sphinx/directives/*",
448+
"sphinx/domains/*",
449+
"sphinx/environment/*",
450+
"sphinx/ext/*",
451+
"sphinx/pycode/*",
535452
"sphinx/pygments_styles.py",
536453
"sphinx/registry.py",
537-
"sphinx/search/*.py",
538-
"sphinx/testing/fixtures.py",
539-
"sphinx/testing/path.py",
540-
"sphinx/testing/restructuredtext.py",
541-
"sphinx/testing/util.py",
542-
"sphinx/transforms/__init__.py",
543-
"sphinx/transforms/compact_bullet_list.py",
544-
"sphinx/transforms/references.py",
545-
"sphinx/transforms/i18n.py",
546-
"sphinx/transforms/post_transforms/__init__.py",
547-
"sphinx/transforms/post_transforms/code.py",
548-
"sphinx/transforms/post_transforms/images.py",
549-
"sphinx/util/build_phase.py",
550-
"sphinx/util/template.py",
551-
"sphinx/util/osutil.py",
552-
"sphinx/util/docutils.py",
553-
"sphinx/util/_pathlib.py",
554-
"sphinx/util/cfamily.py",
555-
"sphinx/util/math.py",
556-
"sphinx/util/logging.py",
557-
"sphinx/util/inspect.py",
558-
"sphinx/util/parallel.py",
559-
"sphinx/util/inventory.py",
560-
"sphinx/util/__init__.py",
561-
"sphinx/util/docfields.py",
562-
"sphinx/util/display.py",
563-
"sphinx/util/http_date.py",
564-
"sphinx/util/matching.py",
565-
"sphinx/util/index_entries.py",
566-
"sphinx/util/typing.py",
567-
"sphinx/util/images.py",
568-
"sphinx/util/exceptions.py",
569-
"sphinx/util/requests.py",
570-
"sphinx/util/docstrings.py",
571-
"sphinx/util/rst.py",
572-
"sphinx/util/i18n.py",
573-
"sphinx/util/fileutil.py",
574-
"sphinx/util/png.py",
575-
"sphinx/util/tags.py",
576-
"sphinx/util/texescape.py",
577-
"sphinx/util/nodes.py",
578-
"sphinx/util/_io.py",
579-
"sphinx/writers/text.py",
580-
"sphinx/writers/html5.py",
581-
"sphinx/writers/html.py",
582-
"sphinx/writers/texinfo.py",
583-
"sphinx/writers/latex.py",
584-
"sphinx/writers/xml.py",
585-
"sphinx/writers/manpage.py",
586-
"tests/conftest.py",
587-
"tests/roots/**/*",
588-
"tests/test_addnodes.py",
589-
"tests/test_application.py",
590-
"tests/test_builders/test_build_html_maths.py",
591-
"tests/test_builders/test_build_html_image.py",
592-
"tests/test_builders/test_build_latex.py",
593-
"tests/test_builders/test_build_text.py",
594-
"tests/test_builders/test_build_html_5_output.py",
595-
"tests/test_builders/test_build_changes.py",
596-
"tests/test_builders/test_builder.py",
597-
"tests/test_builders/test_build_html_tocdepth.py",
598-
"tests/test_builders/test_build_html_download.py",
599-
"tests/test_builders/test_build_dirhtml.py",
600-
"tests/test_builders/test_build_warnings.py",
601-
"tests/test_builders/test_build_html_assets.py",
602-
"tests/test_builders/test_build_html.py",
603-
"tests/test_builders/test_build_linkcheck.py",
604-
"tests/test_builders/test_build_manpage.py",
605-
"tests/test_builders/xpath_data.py",
606-
"tests/test_builders/test_build_html_highlight.py",
607-
"tests/test_builders/test_build_epub.py",
608-
"tests/test_builders/test_build_html_code.py",
609-
"tests/test_builders/test_build_texinfo.py",
610-
"tests/test_builders/xpath_util.py",
611-
"tests/test_builders/test_build_gettext.py",
612-
"tests/test_builders/conftest.py",
613-
"tests/test_builders/test_build_html_numfig.py",
614-
"tests/test_builders/test_build.py",
615-
"tests/test_config/test_correct_year.py",
616-
"tests/test_config/test_config.py",
617-
"tests/test_directives/test_directive_patch.py",
618-
"tests/test_directives/test_directive_code.py",
619-
"tests/test_directives/test_directive_other.py",
620-
"tests/test_directives/test_directive_option.py",
621-
"tests/test_directives/test_directive_object_description.py",
622-
"tests/test_directives/test_directive_only.py",
623-
"tests/test_directives/test_directives_no_typesetting.py",
624-
"tests/test_domains/test_domain_rst.py",
625-
"tests/test_domains/test_domain_py_pyobject.py",
626-
"tests/test_domains/test_domain_cpp.py",
627-
"tests/test_domains/test_domain_py_canonical.py",
628-
"tests/test_domains/test_domain_js.py",
629-
"tests/test_domains/test_domain_c.py",
630-
"tests/test_domains/test_domain_py_fields.py",
631-
"tests/test_domains/test_domain_py.py",
632-
"tests/test_domains/test_domain_std.py",
633-
"tests/test_domains/test_domain_py_pyfunction.py",
634-
"tests/test_environment/test_environment_indexentries.py",
635-
"tests/test_environment/test_environment_record_dependencies.py",
636-
"tests/test_environment/test_environment_toctree.py",
637-
"tests/test_environment/test_environment.py",
638-
"tests/test_errors.py",
639-
"tests/test_events.py",
640-
"tests/test_extensions/test_ext_doctest.py",
641-
"tests/test_extensions/test_extension.py",
642-
"tests/test_extensions/test_ext_imgconverter.py",
643-
"tests/test_extensions/test_ext_graphviz.py",
644-
"tests/test_extensions/test_ext_apidoc.py",
645-
"tests/test_extensions/test_ext_autodoc.py",
646-
"tests/test_extensions/test_ext_todo.py",
647-
"tests/test_extensions/autodoc_util.py",
648-
"tests/test_extensions/test_ext_extlinks.py",
649-
"tests/test_extensions/test_ext_autodoc_events.py",
650-
"tests/test_extensions/test_ext_githubpages.py",
651-
"tests/test_extensions/test_ext_intersphinx.py",
652-
"tests/test_extensions/test_ext_napoleon.py",
653-
"tests/test_extensions/test_ext_coverage.py",
654-
"tests/test_extensions/ext_napoleon_pep526_data_numpy.py",
655-
"tests/test_extensions/test_ext_autodoc_configs.py",
656-
"tests/test_extensions/test_ext_viewcode.py",
657-
"tests/test_extensions/test_ext_autodoc_preserve_defaults.py",
658-
"tests/test_extensions/test_ext_autodoc_mock.py",
659-
"tests/test_extensions/test_ext_autodoc_autoclass.py",
660-
"tests/test_extensions/test_ext_imgmockconverter.py",
661-
"tests/test_extensions/test_ext_autodoc_autoattribute.py",
662-
"tests/test_extensions/test_ext_ifconfig.py",
663-
"tests/test_extensions/test_ext_autodoc_autofunction.py",
664-
"tests/test_extensions/ext_napoleon_pep526_data_google.py",
665-
"tests/test_extensions/test_ext_duration.py",
666-
"tests/test_extensions/test_ext_autodoc_autoproperty.py",
667-
"tests/test_extensions/test_ext_autosummary.py",
668-
"tests/test_extensions/test_ext_autosectionlabel.py",
669-
"tests/test_extensions/test_ext_napoleon_docstring.py",
670-
"tests/test_extensions/test_ext_autodoc_automodule.py",
671-
"tests/test_extensions/test_ext_autodoc_private_members.py",
672-
"tests/test_extensions/test_ext_math.py",
673-
"tests/test_extensions/test_ext_autodoc_autodata.py",
674-
"tests/test_extensions/test_ext_inheritance_diagram.py",
675-
"tests/test_highlighting.py",
676-
"tests/test_intl/test_catalogs.py",
677-
"tests/test_intl/test_intl.py",
678-
"tests/test_intl/test_locale.py",
679-
"tests/test_markup/test_smartquotes.py",
680-
"tests/test_markup/test_markup.py",
681-
"tests/test_markup/test_parser.py",
682-
"tests/test_markup/test_metadata.py",
683-
"tests/test_project.py",
684-
"tests/test_pycode/test_pycode_parser.py",
685-
"tests/test_pycode/test_pycode_ast.py",
686-
"tests/test_pycode/test_pycode.py",
687-
"tests/test_quickstart.py",
688-
"tests/test_roles.py",
689-
"tests/test_search.py",
690-
"tests/test_toctree.py",
691-
"tests/test_transforms/test_transforms_reorder_nodes.py",
692-
"tests/test_transforms/test_transforms_move_module_targets.py",
693-
"tests/test_transforms/test_transforms_post_transforms_code.py",
694-
"tests/test_transforms/test_transforms_post_transforms.py",
695-
"tests/test_util/test_util_display.py",
696-
"tests/test_util/test_util_inventory.py",
697-
"tests/test_util/intersphinx_data.py",
698-
"tests/test_util/test_util_logging.py",
699-
"tests/test_util/test_util_matching.py",
700-
"tests/test_util/test_util_typing.py",
701-
"tests/test_util/test_util_fileutil.py",
702-
"tests/test_util/test_util_template.py",
703-
"tests/test_util/test_util_docstrings.py",
704-
"tests/test_util/test_util_images.py",
705-
"tests/test_util/test_util.py",
706-
"tests/test_util/test_util_nodes.py",
707-
"tests/test_util/test_util_i18n.py",
708-
"tests/test_util/test_util_rst.py",
709-
"tests/test_util/typing_test_data.py",
710-
"tests/test_util/test_util_docutils.py",
711-
"tests/test_util/test_util_inspect.py",
712-
"tests/test_versioning.py",
713-
"tests/test_writers/test_api_translator.py",
714-
"tests/test_writers/test_docutilsconf.py",
715-
"tests/test_writers/test_writer_latex.py",
454+
"sphinx/search/*",
455+
"sphinx/testing/*",
456+
"sphinx/transforms/*",
457+
"sphinx/util/*",
458+
"sphinx/writers/*",
459+
"tests/*",
460+
"tests/roots/*",
461+
"tests/test_builders/*",
462+
"tests/test_config/*",
463+
"tests/test_directives/*",
464+
"tests/test_domains/*",
465+
"tests/test_environment/*",
466+
"tests/test_extensions/*",
467+
"tests/test_intl/*",
468+
"tests/test_markup/*",
469+
"tests/test_pycode/*",
470+
"tests/test_transforms/*",
471+
"tests/test_util/*",
472+
"tests/test_writers/*",
716473
]

CHANGES.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@ Features added
2222
when turning annotations into strings.
2323
Patch by Adam Turner.
2424

25+
* #12319: ``sphinx.ext.extlinks``: Add ``extlink-{name}`` CSS class to links.
26+
Patch by Hugo van Kemenade.
27+
2528
Bugs fixed
2629
----------
2730

31+
* #12314: Properly format ``collections.abc.Callable`` in annotations.
32+
Patch by Adam Turner.
2833
* #12162: Fix a performance regression in the C domain that has
2934
been present since version 3.0.0.
3035
Patch by Donald Hunter.
@@ -34,6 +39,9 @@ Bugs fixed
3439
Patch by Matthias Geier.
3540
* #12224: Properly detect WebP files.
3641
Patch by Benjamin Cabé.
42+
* #12380: LaTeX: Footnote mark sometimes indicates ``Page N`` where ``N`` is
43+
the current page number and the footnote does appear on that same page.
44+
Patch by Jean-François B.
3745

3846
Testing
3947
-------

EXAMPLES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Documentation using the alabaster theme
2828
* `Invoke <https://docs.pyinvoke.org/>`__
2929
* `Jinja <https://jinja.palletsprojects.com/>`__
3030
* `Lino <https://www.lino-framework.org/>`__ (customized)
31+
* `Linux kernel <https://www.kernel.org/doc/html/latest/index.html>`__ (customized)
3132
* `marbl <https://getmarbl.readthedocs.io/>`__
3233
* `MeshPy <https://documen.tician.de/meshpy/>`__
3334
* `Molecule <https://molecule.readthedocs.io/>`__
@@ -214,7 +215,6 @@ Documentation using sphinx_rtd_theme
214215
* `Learning Apache Spark with Python <https://runawayhorse001.github.io/LearningApacheSpark>`__
215216
* `LibCEED <https://libceed.readthedocs.io/>`__
216217
* `Linguistica <https://linguistica-uchicago.github.io/lxa5/>`__
217-
* `Linux kernel <https://www.kernel.org/doc/html/latest/index.html>`__
218218
* `Mailman <https://docs.list.org/>`__
219219
* `MathJax <https://docs.mathjax.org/>`__
220220
* `MDTraj <https://mdtraj.org/>`__ (customized)

doc/development/tutorials/examples/recipe.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class RecipeDomain(Domain):
122122
'recipes': [], # object list
123123
'recipe_ingredients': {}, # name -> object
124124
}
125+
data_version = 0
125126

126127
def get_full_qualified_name(self, node):
127128
return f'recipe.{node.arguments[0]}'

doc/development/tutorials/examples/todo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def setup(app: Sphinx) -> ExtensionMetadata:
132132

133133
return {
134134
'version': '0.1',
135+
'env_version': 1,
135136
'parallel_read_safe': True,
136137
'parallel_write_safe': True,
137138
}

doc/internals/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Please follow these guidelines when writing code for Sphinx:
156156

157157
Style and type checks can be run as follows::
158158

159-
ruff .
159+
ruff check .
160160
mypy sphinx/
161161

162162
Unit tests

doc/man/sphinx-build.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Options
126126
Distribute the build over *N* processes in parallel, to make building on
127127
multiprocessor machines more effective. Note that not all parts and not all
128128
builders of Sphinx can be parallelized. If ``auto`` argument is given,
129-
Sphinx uses the number of CPUs as *N*.
129+
Sphinx uses the number of CPUs as *N*. Defaults to 1.
130130

131131
.. versionadded:: 1.2
132132
This option should be considered *experimental*.

0 commit comments

Comments
 (0)