James Addison
0ef96a7d52
[tests] fix flakiness of `test_linkcheck_exclude_documents` ( #12189 )
2024-03-25 11:48:03 +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
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
Bénédikt Tran
d91ba115bd
Verify that an asset file to be copied exists ( #12183 )
2024-03-23 14:57:32 +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
danieleades
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
James Addison
d7c94d1696
[cleanup] test utils: more concise BaseHTTPRequestHandler references. ( #12158 )
2024-03-21 15:08:49 +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
James Addison
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 Sewell
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
Chris Sewell
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
James Addison
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
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 Addison
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
danieleades
4f7318767c
[lint] extend FURB lints ( #12088 )
2024-03-17 12:06:39 +01:00
Bénédikt Tran
57e302ed74
[lint] run `mypy on tests/test_addnodes.py` ( #12111 )
2024-03-16 18:38:22 +01:00
Bénédikt Tran
b0ded2e624
[lint] run `mypy on test_application.py` ( #12112 )
2024-03-16 18:29:44 +01:00
Bénédikt Tran
2df5b0a8ab
[lint] whitelist all test files except configuration and utils in tests ( #12109 )
2024-03-16 18:06:58 +01:00
James Addison
5695b76f05
[tests] epub: skip the epubcheck test if Java or epubcheck itself are not found ( #12098 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-03-15 12:02:41 +01:00
Bénédikt Tran
98d0cc8602
[tests] skip tests that need remote content if host is offline ( #12091 )
2024-03-14 15:33:24 +01:00
Bénédikt Tran
c86e90842f
[autodoc] add support for singledispatchmethod class methods ( #11284 )
2024-03-14 12:26:35 +01:00
Bénédikt Tran
dbb4da375f
[tests] correctly intercept or suppress warnings in tests ( #12085 )
2024-03-14 11:45:45 +01:00
danieleades
92380e60d1
[lint] add RUFF005 lint ( #12068 )
...
Co-authored-by: daniel.eades <daniel.eades@seebyte.com >
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-03-14 11:26:30 +01:00
danieleades
fb91cb3f43
[lint] add FURB105 lint ( #12069 )
...
Co-authored-by: daniel.eades <daniel.eades@seebyte.com >
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-03-14 11:05:40 +01:00
danieleades
d74a450213
[deps] bump ruff version ( #12065 )
...
Co-authored-by: daniel.eades <daniel.eades@seebyte.com >
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-03-14 10:42:55 +01:00
James Addison
c6bd97ceae
Revert "tests: implement readiness check before yielding local-http(s) test servers" ( #12078 )
2024-03-14 09:01:17 +01:00
James Addison
5523c9bbe4
[tests] reflect changes to Enum signature in Python 3.13 ( #12054 )
2024-03-08 11:58:04 +01:00
James Addison
1bfddf81e0
[CI/CD] implement readiness check before yielding local-http(s) test servers ( #12050 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-03-08 11:16:31 +01:00
Will Lachance
ae51974e21
[search] fix multiple term matching edge case ( #11960 )
2024-03-03 18:01:10 +01:00
Will Lachance
1e4f80d7a4
[search] fix partial matches overwriting full matches ( #11958 )
2024-03-03 15:18:07 +01:00
Ned Batchelder
a7df31cfc6
[render] do not use a dash if there's no description to introduce ( #12035 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-03-03 10:46:11 +01:00
Bénédikt Tran
d8c301482d
[hotfix] fix a warning in #12036 ( #12043 )
2024-03-03 09:29:47 +00:00
Ned Batchelder
574519900e
[test] force rendering of ANSI colors for non-tty objects ( #12036 )
2024-03-02 17:36:41 +01:00
Michael Goerz
265ffeedbd
[intersphinx] allow case-insensitive match of label-refs through intersphinx ( #12033 )
2024-03-02 12:39:51 +01:00
Will Lachance
9a30ca7da1
[HTML search] use anchor for search preview ( #11944 )
2024-02-27 15:22:52 +01:00
James Addison
8aa5edd585
[config] copyright correction logic: handle year-to-year ranges without trailing authorship info ( #11914 )
2024-02-24 16:21:29 +01:00
Bénédikt Tran
707bfbd669
[gettext] fix flaky test on windows ( #11940 )
2024-02-24 13:34:52 +01:00
MatrixEditor
182053198d
Added support for `slice` objects in subscriptions ( #11981 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-02-14 14:45:30 +01:00
Bénédikt Tran
08386826fb
Add tests for `:manpage:` inside a title ( #11705 )
2024-02-14 10:33:09 +01:00
Bénédikt Tran
b587eb243a
Fix `:paramtype:` reference targets ( #11964 )
2024-02-14 00:04:49 +01:00
Frank Dana
41ab0f9a41
[test] add py:currentmodule unit test ( #11920 )
2024-02-03 16:14:26 +01:00
j-carson
cd2bf0a7e5
#11917 - Fix rendering of inherited members for Python 3.9 ( #11919 )
...
Co-authored-by: j-carson <j-carson@fastmail.com >
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com >
2024-02-03 10:46:13 +01:00
danieleades
f9c8943889
Use `# NoQA` consistently ( #11903 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com >
2024-01-21 20:20:58 +00:00
Hugo van Kemenade
95b2cce9a0
Add a `versionremoved` directive ( #11905 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM >
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com >
2024-01-21 20:12:52 +00:00
James Addison
2418e007ce
Support unary subtraction in annotation parsing ( #11904 )
2024-01-21 14:31:04 +00:00
Adam Turner
360c7a8022
Load themes through iteration rather than recursion
2024-01-21 03:59:31 +00:00