Commit Graph

20229 Commits

Author SHA1 Message Date
Adam Turner
6f5a99a05d
Refactor `sphinx.environment.adapters.TocTree` (#11565) 2023-08-09 15:43:26 +01:00
Albert Y. Shih
3e30fa36a2
Fix missing and broken links in inheritance diagrams (#10614)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-08 20:32:58 +01:00
grayjk
ac2b7599d2
autosummary: Extract summary line after "e.g." (#11196)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-07 22:20:30 +01:00
Adam Turner
8cd677f929 Add a new test for `_file_checksum` 2023-08-07 21:51:25 +01:00
Adam Turner
85ffb3b0fd Fix `test_assets_order` for Pygments 2.16 2023-08-07 21:51:05 +01:00
Adam Turner
083d573b7c Fix `test_dark_style` for Pygments 2.16 2023-08-07 21:04:14 +01:00
Dmitry Shachnev
8a990db49e
Update `test_captioned_code_block` for latest Docutils (#11551)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-05 04:46:41 +01:00
Adam Turner
062a2e1d05 Set codec error handler for git hash detection 2023-08-05 03:50:52 +01:00
Adrian Vollmer
92c4874620
Correct a spelling error in `sphinx.util.i18n` (#11549) 2023-08-02 16:15:39 +01:00
Adam Turner
43ab23a61f Merge branch '7.1.x'
# Conflicts:
#	CHANGES
#	sphinx/__init__.py
2023-08-02 02:58:30 +01:00
Adam Turner
320d0b631c Bump to 7.1.2 final 2023-08-02 02:56:30 +01:00
James Addison
06c1339bb3
Ensure that `linkcheck_anchors` is properly respected (#11544)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-02 02:55:37 +01:00
James Addison
89808c6f49 Emend attribution for GH-11431 in CHANGES (#11547) 2023-08-02 02:08:06 +01:00
James Addison
a549c67615
Emend attribution for GH-11431 in CHANGES (#11547) 2023-08-02 02:06:49 +01:00
Jean-François B
4958d2abf1 Fix flake8 E231 reported linting failure 2023-08-02 02:04:55 +01:00
Adam Turner
4862da883f Bump version 2023-08-02 01:55:23 +01:00
blaisep
b0fe730146 Fix #11407 adjust the spelling in the example. 2023-07-30 15:08:49 +02:00
Jean-François B
eb0499a696 Fix flake8 E231 reported linting failure 2023-07-30 15:00:55 +02:00
Jean-François B
f683244c91 LaTeX: remove potential space tokens from optionlist and lineblock
Relates #11530
2023-07-30 14:55:47 +02:00
Jean-François B
0003c6a79d Update CHANGES for PR #11530 2023-07-30 14:52:20 +02:00
Adrian Vollmer
826b814894 Fix LaTeX output of line-block
Because the newlines are not commented out, this leaves an empty token
at the beginning of the block. This empty token manifests as a spurious
empty line in certain contexts, for example when using the line block
inside a definition list.

This closes #11529.
2023-07-30 14:49:37 +02:00
Adam Turner
629b862cde
Spring-clean `sphinx.testing.utils` (#11534) 2023-07-28 23:24:13 +01:00
Adam Turner
1cfb68d8be
Consistently name the object description options (#11533)
*  The directive option ``:noindex:`` was renamed to ``:no-index:``.
*  The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
*  The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.

The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
2023-07-28 22:30:26 +01:00
Adam Turner
ff20efcd7e
Tweaks to `doctest_show_successes` (#11535) 2023-07-28 22:29:04 +01:00
Trey Hunner
aef5445153
Add `doctest_show_success option to sphinx.ext.doctest` (#10938)
For documentation that includes *many* doctests,
seeing both successes and failures can add a lot of noise to the command output.

This change adds a ``doctest_show_success`` option that,
when set to ``False``, will only show doctest failures.
2023-07-28 22:16:38 +01:00
Rouslan Korneychuk
d1b09b04c2
Added TOC object entry support for the C++ domain (#11221)
When ``toc_object_entries_show_parents = 'domain'`` in the config,
the TOC entries omit the namespaces added by the ``cpp:namespace`` and ``cpp:namespace-push`` directives.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-07-28 20:14:49 +01:00
latosha-maltba
97d2c5da2f
Add the `:no-typesetting:` option for only creating targets (#10478)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 19:43:27 +01:00
Téo Bouvard
05a14ff007
Don't filter `ImportWarning in ext.autodoc.importer` (#11024) 2023-07-28 17:53:49 +01:00
Val Lorentz
eb3fffc3e9
Pre-compile all `excludes regular expressions in apidoc` (#10981)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 17:31:56 +01:00
Chris Lamb
f0fead5351
Change the default value of `locale_dir to None` (#11037)
The ``locale_dir`` keyword argument for the ``init_console()`` method
defaults to the path that method is implemented in (via ``__file__``),
and then that (non-deterministic) default argument is included in Sphinx's own documentation.
This makes the build unreproducible as it varies
depending on the directory you create the documentation from.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-07-28 16:58:05 +01:00
Adam Turner
c9f0e67cca
Add `sphinx.util.index_entries` (#11528) 2023-07-28 07:41:10 +01:00
Christoph Hasse
fca33a203d
Add additional `stringify_annotation` tests (#11027) 2023-07-28 06:45:20 +01:00
Adam Turner
d779a1c53e Move `split_full_qualified_name() to ext.autosummary.generate` 2023-07-28 06:29:45 +01:00
Adam Turner
58585a7c0a Unify `get_full_modname` 2023-07-28 06:27:46 +01:00
benkrikler
762ed8540a
Add line numbers in `sphinx.ext.viewdoc` (#6319)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 05:52:48 +01:00
Ralf Grubenmann
6178163cb1
Fix relative references in SVGs generated by `sphinx.ext.graphviz` (#11078)
Co-authored-by: Ralf Grubenmann <ralf.grubenmann@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 05:47:23 +01:00
Martin Liška
2c0b81d88b
Refactor `test_attrgetter_using` (#11293)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 04:20:36 +01:00
Jorge Leitao
99f9209924
Add summary statistics to the coverage report (#5474)
The current implementation of ``sphinx.ext.coverage`` outputs which
methods,classes, and functions are documented.
This commit adds a short summary of this report in terms of
``documented objects / total number of objects``,
both per module and total.

The purpose of this is to support
a currently not mainstream but relevant use-case:
a coverage report on the number of objects that are documented.

By having the statistics on the report or on the stdout,
a regex expression can capture the coverage percentage
(e.g. ``re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)``)
and use it e.g. in another report, a status badge, etc.

Two options were added to the configuration to allow a table
to be printed in the report and/or to stdout.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-07-28 02:33:42 +01:00
Adam Turner
7cce00aa7d
Refactor `sphinx.util.inspect` and tests (#11527) 2023-07-28 02:05:40 +01:00
Adam Turner
c9d4a1a204 Correctly copy extentionless template files 2023-07-28 00:49:53 +01:00
Adam Turner
49d8304670
Start using `pathlib.Path and deprecate sphinx.testing.path` (#11526) 2023-07-28 00:39:12 +01:00
Kayce Basques
23c7fdde75
Differentiate the colour of previously-visited hyperlinks (#11390)
Add ``a:visited`` to the CSS templates
2023-07-27 23:02:14 +01:00
James Addison
467e94dc62
object inspection: produce deterministic descriptions for nested collection datastructures (#11312)
``util.inspect.object_description`` already attempts to sort collections, but this can fail.
This commit handles the failure case by using string-based object descriptions
as a fallback deterministic sort ordering, and protects against recursive collections.

Co-authored-by: Chris Lamb <lamby@debian.org>
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-07-27 22:45:51 +01:00
Adam Turner
7d16dc0cac
Use `time.strftime` for date formatting in the EUPB builder (#11525)
When ``language`` is hardcoded to English, we can avoid the indirection of
``sphinx.util.i18n.format_date`` and Babel.
2023-07-27 22:11:15 +01:00
Adam Turner
a01e1a21ac Merge branch '7.1.x'
# Conflicts:
#	CHANGES
#	sphinx/__init__.py
#	sphinx/config.py
2023-07-27 21:38:35 +01:00
Adam Turner
d8d73c16b8 Bump to 7.1.1 final 2023-07-27 21:35:23 +01:00
Adam Turner
a54e630a21 [internationalisation] Update message catalogues 2023-07-27 21:34:26 +01:00
Adam Turner
8452300d54
Fix multi-line copyright when `SOURCE_DATE_EPOCH` is set (#11524)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2023-07-27 21:27:14 +01:00
Adam Turner
fe08cec019 bump version 2023-07-27 20:20:33 +01:00
Adam Turner
cb6d568715
Enable `strict-optional` for several more modules (#11523)
This enables mypy's ``strict-optional`` mode for:

* ``sphinx.builders.html``
* ``sphinx.builders.latex``
* ``sphinx.domains.python``
* ``sphinx.domains.std``
* ``sphinx.environment``
* ``sphinx.ext.apidoc``
* ``sphinx.ext.autodoc``
* ``sphinx.ext.autodoc.importer``
* ``sphinx.ext.autosummary``
* ``sphinx.ext.autosummary.generate``
* ``sphinx.ext.inheritance_diagram``
* ``sphinx.ext.intersphinx``
* ``sphinx.ext.imgmath``
* ``sphinx.ext.mathjax``
* ``sphinx.ext.napoleon.docstring``
* ``sphinx.registry``
* ``sphinx.writers.latex``
2023-07-27 20:17:35 +01:00