Commit Graph
20711 Commits
Author SHA1 Message Date
Bénédikt Tran 2e05fd2ffe [cleanup] remove deprecated objects and improve deprecation private interface (#12185)
This removes the deprecated objects that should have been removed in 7.x.
2024-03-25 12:45:45 +01:00
James Addison 0ef96a7d52 [tests] fix flakiness of `test_linkcheck_exclude_documents` (#12189) 2024-03-25 11:48:03 +01:00
Bénédikt Tran f44ff30673 [doc] cleanup references and update external URLs (#12182) 2024-03-25 11:39:05 +01:00
Bénédikt Tran f26d492d6d [config] protect `is_serializable` against circular references (#12196) 2024-03-25 11:19:02 +01:00
Bénédikt Tran 885818bb7f [tests] move utilities and static data into dedicated modules and remove `html5lib` (#12173)
Since #12168, HTML files are now XML compliant, hence ``html5lib`` is no more needed as a testing dependencies.
2024-03-25 11:03:44 +01:00
Jakob Lykke Andersen 9e239729d4 C, fix debug functionality (#12194) 2024-03-24 14:44:19 +01:00
Bénédikt Tran f24eef7b6b [cleanup] deprecate `sphinx.testing.util.strip_escseq in favor of sphinx.util.console.strip_colors` (#12186) 2024-03-24 00:43:54 +01:00
22cee42094 [lint] use `types-docutils instead of docutils-stubs for docutils` type annotations (#12012)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-23 21:09:18 +01:00
James AddisonandBénédikt Tran 42a0d73160 [lint] follow PEP 8 for module-level dunder names (#12180)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-23 19:21:22 +01:00
James Addison 4b3c4abe0d [cleanup] add `confval role to entry for linkcheck_allow_unauthorized` (#12177) 2024-03-23 17:40:50 +01:00
Bénédikt Tran d91ba115bd Verify that an asset file to be copied exists (#12183) 2024-03-23 14:57:32 +01:00
Hugo van Kemenade b1548d0aa4 CI: Print detailed Python version (#12176)
Print additional python version information for CI jobs
2024-03-22 18:10:35 +01:00
Chris Sewell 66fa790b3a [tests] Add basic build test for all builtin themes (#12168)
Add `tests/test_theming/test_theming.py::test_theme_builds`, which is a parametrized test against all builtin sphinx HTML themes, that tests:

1. that the themes builds without warnings for a basic project, and
2. that all `.html` files it produces are valid XML (see https://html.spec.whatwg.org/)

https://pypi.org/project/defusedxml/ was added to the test dependencies, in order to safely parse the XML

This required one fix for `sphinx/themes/basic/search.html`, and one for `sphinx/themes/bizstyle/layout.html`

Also, `tests/test_theming` was removed from the `ruff format` exclude list
2024-03-22 12:57:34 +01:00
Sutou KouheiandChris Sewell 982679eeee [autosummary] fix suffix detection (#12149)
Fix a bug whereby the wrong file extension may be used,
when multiple suffixes are specified in the `source_suffix` configuration.

Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-03-22 11:27:56 +01:00
6c92c5c0f3 [lint] bump ruff version (#12170)
Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-22 10:33:42 +01:00
James Addison 4eede5c534 [tests] Increase timeouts for linkcheck build tests. (#12166)
This is an attempt to resolve intermittent failures of the linkcheck tests currently occuring on the GitHub CI
2024-03-21 21:46:27 +01:00
Chris SewellandBénédikt Tran d59b158371 👌 Make ExtensionMetadata type public and use it in internal extensions (#12153)
This type alias has now been fully documented for public consumption.

This will be beneficial to the sphinx ecosystem,
to aide/encourage extension developers to provide the correct metadata.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-21 16:19:26 +01:00
ace9d97500 👌 Improve signature and type annotations for SphinxLoggerAdapter.warning (#12154)
This commit overrides the  `SphinxLoggerAdapter.warning` method,
to provide documentation and type annotations specific to logging sphinx warnings.
This should aide sphinx core/extension developers in creating good warnings.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: danieleades <33452915+danieleades@users.noreply.github.com>
2024-03-21 15:41:22 +01:00
James Addison d7c94d1696 [cleanup] test utils: more concise BaseHTTPRequestHandler references. (#12158) 2024-03-21 15:08:49 +01:00
Chris Sewell b45fee696f 🔧 Sync make doclinter with CI check (#12156)
Unignore files in `make doclinter` command, fix the resulting issues, and use this command in the CI job
2024-03-21 13:12:06 +01:00
Bénédikt Tran da0733b338 [autodoc] fix rendering of enumerations inheriting from mixin and data types (#11596) 2024-03-21 12:36:36 +01:00
James Addison 078a80a42d [refactor] test utils: simplify signatures and remove from ruff exclusion list. (#12155)
Apply some small method-signature cleanups in `tests/utils.py`,
and remove it from the `ruff format` exclusion list.
2024-03-21 11:08:35 +01:00
b7f708dc63 [tests] utils: refactor type-hint signatures. (#12144)
Consolidate the provision of a single `http_server` utility method, with `tls_enabled` as a boolean flag,
and rework type annotations to make them more understandable.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-03-20 23:13:41 +01:00
Chris SewellandBénédikt Tran d908886c03 📚 add tip about running karma js tests on mac (#12140)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-20 21:55:34 +01:00
Chris Sewell 2d6f73ed68 🔧 Ruff format select sphinx modules with minimal diffs (#12146)
This comit removes select sphinx top-level modules from the `ruff format` exclude list.
They were selected based on the fact that they have the least diffs when formatted,
are not believe to introduce changes that would adversely affect any existing PRs.
2024-03-20 21:28:10 +01:00
Chris Sewell 392358d4de 🔧 Ruff format python files within utils folder (#12142)
Remove from `exclude` list
2024-03-19 19:32:28 +01:00
Chris Sewell 3bedde26a9 🔧 Ruff format python files within docs folder (#12139)
Remove `docs` files from the `exclude` list, and also add the `preview = false` format config, which is shown to reduce diffs to the current code base
2024-03-19 15:23:57 +01:00
James AddisonandChris Sewell d93223a886 docs: add reference to templating from theme development. (#12056)
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-03-19 14:43:42 +01:00
dependabot[bot] 3da0b7a403 Bump ruff from 0.3.2 to 0.3.3 (#12123)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 14:00:52 +01:00
Chris SewellandBénédikt Tran 565d4104d5 👌 Handle external references pointing to object types (#12133)
This commit fixes the issue of `objects.inv` denoting object names, whilst the `external` role only allows for role names. 

As an example, take the `objects.inv` for the sphinx documentation, which contains:

```
py:function
    compile                  : usage/domains/python.html#compile
```

A user might understandably expect that they could reference this using `` :external:py:function:`compile` ``, but actually this would previously error with:

```
WARNING: role for external cross-reference not found: py:function
```

this is because, `function` is the object type, yet `external` expects the related role name `func`.

It should not be necessary for the user to know about this distinction,
so in this commit, we add logic, to first look if the name relates to a role name (as previous, to not be back-breaking) but, if not, then also look if the name relates to an object that has a known role and, if so, use that.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 13:42:50 +01:00
Bénédikt Tran b9b0ad856a [lint] ignore `venv` directory (#12138) 2024-03-19 11:07:08 +01:00
d8cf71cbde 🔧 Setup ruff format (initially excluding all files) (#12136)
Co-authored-by: danieleades <33452915+danieleades@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 10:27:41 +01:00
Chris SewellandBénédikt Tran b0f096f440 ✨ Add show_warning_types configuration variable (#12131)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 10:22:28 +01:00
Chris Sewell 3f3d3d8517 🔧 Add flake8 to make style-check (#12137) 2024-03-19 10:07:41 +01:00
Chris Sewell aaecc9376d 🔧 Remove unused regexes (#12132)
These appear to have been copied to class variables at some point, but then not removed as global variables
2024-03-19 09:36:22 +01:00
Chris SewellandBénédikt Tran a27f156e31 🔧 Add check rule to Makefile (#12135)
To run all linting/type-checking, just for dev ease

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 09:34:34 +01:00
dependabot[bot]andChris Sewell 95d710e78f Bump softprops/action-gh-release from 1 to 2 (#12059)
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-03-19 03:03:48 +01:00
dependabot[bot]andChris Sewell 63c53c412f Bump peter-evans/create-pull-request from 5 to 6 (#11947)
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-03-19 02:54:26 +01:00
dependabot[bot]andChris Sewell 2f6156f605 🔧 Bump codecov/codecov-action from 3 to 4 (#11948)
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-03-19 02:45:53 +01:00
James AddisonandBénédikt Tran 7894b5a269 [tests] linkcheck: add test coverage for behaviour of a locally-existing file. (#12128)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-18 18:36:22 +01:00
Brad King a9383a026e [search] order non-main index entries after other results (#11696) 2024-03-18 17:37:59 +01:00
Bénédikt Tran ff252861a7 [tests] add missing `@pytest.mark.sphinx` markers (#12125) 2024-03-18 11:16:15 +01:00
Bénédikt Tran 6ac2210109 [tests] use deduced `srcdir` instead of an explicit one (#12124) 2024-03-18 10:59:48 +01:00
James AddisonandBénédikt Tran bf0bec3b4b [search] filter script and style elements from search result summary text. (#12057)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-17 15:14:03 +01:00
Bénédikt Tran b2069fb64f [lint] update Makefile and lint doc (#12117) 2024-03-17 14:45:56 +01:00
danieleades 4f7318767c [lint] extend FURB lints (#12088) 2024-03-17 12:06:39 +01:00
Johannes AltmanningerandBénédikt Tran 22968d29f5 [manpage] emit OSC 8 hyperlinks via groff (#12108)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-17 10:55:04 +01:00
James AddisonandBénédikt Tran e2ad48a521 [search] Update copyright year in the searchfield.html header. (#12110)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-17 02:27:15 +01:00
Bénédikt Tran 6b45608f1d [lint] remove files from whitelist that are currently fine (#12113) 2024-03-16 19:09:28 +01:00
Bénédikt Tran 57e302ed74 [lint] run `mypy on tests/test_addnodes.py` (#12111) 2024-03-16 18:38:22 +01:00