Commit Graph

4692 Commits

Author SHA1 Message Date
Adam Turner
932e5c56db Fix repr of paths on Windows 2024-07-23 03:28:50 +01:00
danieleades
2f9a79c3b2 Disallow implicit re-export (#12653) 2024-07-23 02:38:45 +01:00
danieleades
58d4224227 Disallow untyped calls (#12640)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-23 02:22:58 +01:00
Adam Turner
3b009cd627 Mark type aliases with `TypeAlias` (#12658) 2024-07-23 01:21:29 +01:00
Bénédikt Tran
61daf1c27c intersphinx: Fix cache handling (#12087)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
2024-07-22 23:09:11 +01:00
Adam Turner
f31dbabf20 Remove `_StrPath` (#12650) 2024-07-22 16:22:41 +01:00
Adam Turner
217f267822 Do not overwrite user-supplied data by default when copying (#12647) 2024-07-22 16:00:16 +01:00
Adam Turner
9e3f4521db Drop support for Python 3.9 (#12633) 2024-07-22 15:05:15 +01:00
Adam Turner
e174df2762 Rename `normalize_intersphinx_mapping to validate_intersphinx_mapping` (#12643) 2024-07-22 13:32:44 +01:00
Bénédikt Tran
aacca3064e Remove support for the Sphinx 0.5 `intersphinx_mapping` format (#12083)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-22 12:59:59 +01:00
James Addison
45f3cd6324 HTML Search: Remove unused function-call arguments in tests (#12628) 2024-07-20 23:32:25 +01:00
Chris Sewell
dabacdf5f8 Turn `show_warning_types` on by default (#12597)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-20 21:07:06 +01:00
James Addison
cc08854bc2 linkcheck: Update configuration defaults for Sphinx 8.0 (#12630)
- Links that respond with HTTP 401 (unauthorized) responses are now considered ``broken`` by default.
- Timeouts that occur when checking a link are now reported with a distinct `timeout` status code, instead of the previous ``broken``.
- The previous behaviours are still available and can be configured on an opt-in basis per-project using ``conf.py``.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-20 20:41:22 +01:00
danieleades
20507af3d7 Add missing type stubs (#12619)
Co-authored-by: Daniel Eades <daniel.eades@seebyte.com>
2024-07-20 19:54:49 +01:00
Adam Turner
af82d70c60 Raise `ThemeError` for invalid theme sections 2024-07-20 19:40:29 +01:00
Adam Turner
9f886cc878 Raise `ConfigError on invalid html_sidebars` values 2024-07-20 19:40:29 +01:00
Bénédikt Tran
6c486a575c Fix detecting file changes for the overwritten file warning (#12627)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-20 14:31:53 +01:00
Adam Turner
2bd973e719 autodoc: Fix warnings with dataclasses in `Annotated` metadata (#12622) 2024-07-20 11:28:03 +01:00
Adam Turner
dd77f85149 Support callables in `Annotated` types (#12625) 2024-07-20 11:16:33 +01:00
Adam Turner
1ed4ca7e03 Mark `test_build_manpage` as XFAIL following changes in Docutils master 2024-07-20 11:03:16 +01:00
Adam Turner
587da413ca Warn when files are overwritten in the build directory (#12612) 2024-07-19 08:20:48 +01:00
James Addison
f081136ebd intersphinx: Reduce log severity for ambiguity detection during inventory loading (#12615) 2024-07-18 13:15:20 +01:00
Adam Turner
e61f56950d Do not add the module prefix when generating autosummary documents (#12609) 2024-07-17 21:42:21 +01:00
James Addison
47757c4062 HTML search: Ensure that `checkRanking` fails when the final entry is not found (#12608)
The ``checkRanking`` function in our test suite has a bug; it's currently possible for the final item in the expected ranking list *not* to be found in the result-set, and yet for the function to pass.

**Expected Behaviour**
The ``checkRanking`` function should confirm that all of the items specified in the ``expectedRanking`` argument appear within the ``results`` argument, and in the list-iteration-order provided.  If they do not, then an assertion error should be raised, failing the test.

**Actual Behaviour**
If all items up until the final entry in the ``expectedRanking`` argument are found in the expected order, but the final entry itself is not found at all in the ``results``, then no assertion error is raised, and the test passes.
2024-07-17 16:29:55 +01:00
Jean-François B.
152b78318d LaTeX: fix figures in seealso and seealso inside table cell (#12598)
This also fixes unreported issues unrelated to the 7.4.0 release:

- (now old style "lightbox") admonitions render badly in tabulary,
- "heavybox" admonitions (they are all now but warning et al. were already) cause PDF crash if in tabulary and rendered badly if in tabular or longtable.
- figure in a table cell is not properly separated from immediately preceding text.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-16 21:03:42 +01:00
Adam Turner
5edca97a2e Warn when `html_sidebars` values are strings (#12600) 2024-07-16 20:48:49 +01:00
James Addison
cfd3645eb7 intersphinx: Don't warn about pure-duplicate ambiguous definitions when loading inventory entries (#12586) 2024-07-15 18:37:46 +01:00
Adam Turner
4bdef1b576 Remove old-styled `source_suffix` values in tests 2024-07-15 12:50:56 +01:00
Adam Turner
1c204e63a9 Increment the environment version to resolve C domain issues on incremental rebuilds (#12583) 2024-07-15 12:00:18 +01:00
Adam Turner
73dd9fcb9b Restore support for `typing.ParamSpec` (#12581) 2024-07-15 11:00:13 +01:00
Adam Turner
18ac58bd53 Fix possibly-invalid HTML when a rubric node is manually created 2024-07-15 10:04:48 +01:00
Bénédikt Tran
2a30bb661f Fix PEP 695 output for classes in the LaTeX builder (#12561) 2024-07-15 05:17:36 +01:00
Adam Turner
c4fb47310f Remove `sphinx.environment` from the no-any-generics whitelist (#12575) 2024-07-15 03:49:24 +01:00
Chris Sewell
41b363dbff [rst] Add level option to rubric directive (#12506)
This commit adds a `level` option to the `rubric` directive, which propagates a `level` attribute to the `rubric` node,
and allows renderers to select a specific heading level.

Logic for this attribute has been added to the HTML5 and LaTeX builder.
2024-07-14 05:52:58 +02:00
James Addison
35e7bfc347 linkcheck: Ignore URLs that respond with non-Unicode content (#12197) 2024-07-14 03:48:38 +01:00
Lingyu Hu
f0d8e2ef5e Provide a better error message if the master document is not included in the project documents (#12011) 2024-07-14 03:22:39 +01:00
Jakob Lykke Andersen
e08f12f848 toctree: Use document nesting instead of domain nesting when adding domain objects (#12367)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-14 01:16:26 +01:00
David Stansby
159c26715b Display `typing.Annotated` metadata in the Python domain (#11785)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-14 00:52:55 +01:00
Adam Turner
469a809ead Increase minimum required dependency versions (#12556) 2024-07-13 08:59:24 +01:00
Trevor Bekolay
2c0943784c Disallow module cycles in autosummary (#6792)
Consider the following piece of reST::

  .. automodule:: sphinx.ext.autosummary
     :members:

     .. autosummary::

        sphinx.ext.autosummary.Autosummary

This inserts an autosummary after the module docstring, but before
the members of the module. Without the change in this commit, this
would fail because `import_by_name` would attempt to import::

    sphinx.ext.autosummary.sphinx.ext.autosummary.Autosumary

because the prefix (from the parent) is `sphinx.ext.autosummary`,
and the name is `sphinx.ext.autosummary.Autosummary`, which is able
to be imported from `sphinx.ext.autosummary`, but is not the way
that anyone would want to refer to it.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-13 06:37:50 +01:00
James Addison
a6c2bdd371 Rename template files in Sphinx to use the `.jinja` extension (#12364) 2024-07-11 12:31:35 +01:00
Ashley Whetter
e38a60d3f2 Add `py:type` directive and role for documenting type aliases (#11989)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-11 12:15:54 +01:00
James Addison
91c5cd3abd Improve relevance scoring in HTML search results (#12441)
Co-authored-by: Will Lachance <wlach@protonmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-11 11:55:40 +01:00
Stephen Finucane
6b37a6b2a2 Allow explicitly specifying modules in the coverage builder (#11592)
Currently there is no mechanism to identify totally undocumented modules
in the coverage builder, unlike with partially documented modules.
Resolve this by introducing a new ``coverage_modules`` config option.
This is a list of modules that should be documented somewhere
within the documentation tree. 
Any modules that are specified in the configuration value but 
are not documented anywhere will result in a warning. 
Likewise, any modules that are not in the config option but 
are documented somewhere will result in a warning.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2024-07-11 07:36:36 +01:00
Thomas Fanning
6cc1177d10 Allow configuring the separator used in numbering equations (#12523)
Co-authored-by: Thomas Fanning <tom@ferb.ne.anl.gov>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-10 22:23:38 +01:00
Adam Turner
82edc3d385 Rewrite `usage/configuration.rst` (#12537)
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
2024-07-10 21:43:14 +01:00
tuncbkose
bdd9140842 Remove custom SVG processing in the HTML builder (#12425)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-07-10 18:31:01 +00:00
James Addison
84c11b2f66 Improve JavaScript test fixture generation (#12531)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-10 19:00:34 +01:00
M Bussonnier
6e3a191185 Bump Ruff to 0.5.1 (#12530) 2024-07-10 14:13:10 +01:00
Tim Hoffmann
a95d716f7f Add a class option to the toctree directive (#12524)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-10 11:07:49 +01:00