Commit Graph

21855 Commits

Author SHA1 Message Date
Colin Marquardt
1431d44769
Fix typo 'unpickable' -> 'unpickleable' (#13344)
Normalize other occurrences of '~picklable' to '~pickleable'.

Note, there is no clear winner in the Python docs regarding usage of '~picklable' vs '~pickleable', so we pick the more greppable version.
2025-02-15 15:06:35 +01:00
Adam Turner
c49d925b4d
Remove `productionlist` hard-coding in writers (#13326)
The ``productionlist`` directive operates in a line-based context, creating an ``addnodes.productionlist`` container
of ``addnodes.production`` nodes, with one per production in the directive. However, the full state of the abstract
document tree is not included in the produced nodes, with each builder/translator implementing a different way
of appending the fixed separator ``::=`` and justifying the displayed text.

This should not happen in the writer, and hard-coding such details hampers flexibility when documenting different
abstract grammars. We move the specific form of the ``.. productionlist::`` directive to the logic in the directive body
and have the writers apply minimal custom logic.

LaTeX changes written by Jean-François B.
2025-02-13 00:16:26 +00:00
Will Lachance
bb68e72333
Add ability to "skip" adding marked documentation to the search index (#11280)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-12 16:47:14 +00:00
Matthias Geier
94563a398b
Un-deprecate `sphinx.util.import_object` (#13330)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-11 19:07:27 +00:00
dependabot[bot]
9069005087
Bump Ruff to 0.9.6 (#13327) 2025-02-11 17:55:00 +00:00
Adam Turner
b678d17e00 Fix deprecation warning in `test_ModuleAnalyzer_get_module_source` 2025-02-11 03:13:46 +00:00
Adam Turner
41277fc7bd Convert `package_dir to _StrPath` 2025-02-11 02:55:13 +00:00
Adam Turner
1f693448b0 Inline imports in `sphinx.util` 2025-02-11 02:52:04 +00:00
Adam Turner
288ce2f4cd Replace uses of `canon_path()` 2025-02-11 02:34:59 +00:00
Adam Turner
b88edad731 Remove `addnodes.document` 2025-02-11 02:22:42 +00:00
Adam Turner
47299b8229 Inline function in `get_verifier` 2025-02-11 01:53:26 +00:00
Adam Turner
b81a7d7477 Improve LaTeX skip decorators 2025-02-11 01:49:14 +00:00
Adam Turner
baddae6611 Move `test_log_no_ansi_colors` 2025-02-11 01:42:39 +00:00
Adam Turner
bb5716b54a Split out `test_build_all` 2025-02-11 01:34:12 +00:00
Adam Turner
c069960e8a Use blank testroot for `restructuredtext.parse()` 2025-02-11 01:11:19 +00:00
Adam Turner
ebec42c02b Move `make_app_with_empty_project() to conftest.py` 2025-02-11 00:53:44 +00:00
Adam Turner
a9534901a2 Fix warning interpolation for multiple patterns matches in `html_sidebars` 2025-02-10 15:48:12 +00:00
Adam Turner
d160f3179b Improve whitespace handling in `error_info()` 2025-02-10 15:19:35 +00:00
Adam Turner
4298c30886
Fix continuation line indentation in productionlists (#13319) 2025-02-10 02:00:52 +00:00
Adam Turner
f96904146f
Define valid types for all configuration values (#13324) 2025-02-10 01:58:22 +00:00
Adam Turner
b59d1b7513
Fix possible 'no-wrap' KeyError in maths nodes (#13323) 2025-02-09 22:30:12 +00:00
Adam Turner
790bee64ce
intersphinx: Resolve implicit self-references (#13322)
When intersphinx_resolve_self was added, it only applied to the :external:<inv_name>:`blah` role.
This extends the functionality to implicit intersphinx references of the form :ref:`<inv_name>:blah`.
2025-02-09 22:29:04 +00:00
Adam Turner
9eb5097a56
Refactor `ReferencesResolver` (#13321)
Split ``ReferencesResolver.run()`` into smaller parts.
2025-02-09 21:38:51 +00:00
Adam Dangoor
03df8119b3
Remove mypy override for `tests.test_builders.test_build_html_copyright` (#13317) 2025-02-09 21:29:38 +00:00
Adam Turner
46b6d55467
Reinstate the signature of `InheritanceGraph.generate_dot()` (#13320) 2025-02-09 21:07:30 +00:00
Adam Turner
c4b3dcbaf9
Convert '0' and '1' to bool for config overrides (#13318) 2025-02-07 19:38:33 +00:00
Adam Turner
b11303adb9
Run tests in parallel with `pytest-xdist` (#13287) 2025-02-07 17:17:17 +00:00
Adam Dangoor
cef9d869dd
Remove type check overrides for `tests/test_builders/test_build_gettext.py` (#13299)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-07 15:13:56 +00:00
Adam Dangoor
0782273dec
Remove mypy overrides for two files in `tests/test_writers` (#13315) 2025-02-07 14:49:19 +00:00
Adam Dangoor
36e3f3250d
Remove mypy overrides for `tests/test_extensions/test_ext_autodoc_autodata.py` (#13314) 2025-02-07 14:47:00 +00:00
Adam Dangoor
e33b6ff82d
Remove mypy overrides for `tests/test_config` (#13313) 2025-02-07 14:45:25 +00:00
Adam Dangoor
d2627c44f3
Remove type check overrides for `tests/test_extensions/test_ext_githubpages.py` (#13306) 2025-02-07 14:43:27 +00:00
Adam Dangoor
6de28062fc
Remove type check overrides for `tests/test__cli/test__cli_util_errors.py` (#13305) 2025-02-07 14:42:11 +00:00
Adam Dangoor
7799dd1b8b
Remove type check overrides for `test_build_epub` (#13296) 2025-02-07 14:41:09 +00:00
Adam Turner
22e0f8944b Use pathlib in more places 2025-02-07 13:51:42 +00:00
Adam Turner
c2bea73132 Bump mypy to 1.15.0 2025-02-07 13:34:33 +00:00
dependabot[bot]
203a600888
Bump Ruff to 0.9.5 (#13309)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-07 13:14:23 +00:00
Adam Dangoor
4467c100b4
Pin `pypi-attestations` to an exact version (#13310) 2025-02-07 08:17:46 +00:00
Adam Turner
758dc81303
Add the `intersphinx_resolve_self` option (#13291)
Co-authored-by: Jakob Lykke Andersen <Jakob@caput.dk>
2025-02-03 17:50:46 +00:00
pholica
766900e416
autodoc: Handle multiple inheritance correctly (#13136)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-03 01:46:35 +00:00
Adam Turner
774f8cc738
Add the new `py:deco` cross-reference role (#13292) 2025-02-03 01:07:38 +00:00
Kevin Deldycke
d486e801e2
Always print tracebacks in logs when Sphinx encounters an internal error (#13163)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-03 00:11:24 +00:00
Bénédikt Tran
1b83e55809
autodoc: add support for `python_display_short_literal` (#12003)
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-02 22:50:41 +00:00
Walter Dörwald
50fb4a9dbb
Add :include-subclasses: option to sphinx.ext.inheritance_diagram (#8159)
When this option is given, all sub-classes of the classes listed as arguments to `inheritance-diagram` are included in the diagram.

This makes it possible to generate a complete inheritance tree by just listing the base class and adding `:include-subclasses:`.

This is different from specifying the module that contains this base class, as this module might include other classes that should not be part of the diagram.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-02 20:52:23 +00:00
Adam Turner
34519be296
Ignore test failures from broken Babel 2.17 on Windows (#13290) 2025-02-02 20:01:21 +00:00
Adam Turner
d0107ab02c
Use ruff-action's version detection (#13286) 2025-02-01 08:08:48 +00:00
Adam Turner
0d4425ce07
Use read-only test roots (#13285) 2025-01-31 18:04:36 +00:00
Adam Turner
d24ffe2949 Improve directory handling in `app_params()` 2025-01-31 17:25:13 +00:00
Adam Turner
17b8241585 Include test roots in `pytest_report_header()` 2025-01-31 17:22:51 +00:00
Adam Turner
ad9de97a8c
Run tests on macOS in GitHub Actions (#13284) 2025-01-31 14:17:06 +00:00