Commit Graph

57 Commits

Author SHA1 Message Date
Adam Turner
1ed4ca7e03 Mark `test_build_manpage` as XFAIL following changes in Docutils master 2024-07-20 11:03:16 +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
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
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
James Addison
a6c2bdd371 Rename template files in Sphinx to use the `.jinja` extension (#12364) 2024-07-11 12:31:35 +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
M Bussonnier
6e3a191185 Bump Ruff to 0.5.1 (#12530) 2024-07-10 14:13:10 +01:00
James Addison
778013f91a Regression: restore extraction of data-URI images from source for builders whose output formats do not support them natively (#12344) 2024-07-03 02:16:43 +01:00
James Addison
6b237d9a70 [linkcheck] Allow integer for linkcheck_rate_limit_timeout (#12470)
Eliminate type-related warnings when users configure a valid integer value for the `linkcheck_rate_limit_timeout` config setting.

Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
2024-06-24 17:26:24 +00:00
Thomas Weißschuh
6471027d19 [themes]: Include project name in logo_alt by default (#12421)
The "alt" attribute of an `<img>` is required to convey all information.
Make it clear which logo is shown.
Also make it possible for users to override the logo_alt with a custom value.
2024-06-18 01:47:14 +02:00
Bénédikt Tran
581bcdd140 [config] correctly synchronize `root_doc and master_doc` (#12417) 2024-06-17 18:04:33 +02:00
Thomas Weißschuh
d5bdabdd80 themes: Don't duplicate "navigation" in aria-label (#12422)
The word "navigation" is not supposed to be included as part of the aria-label attribute:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/navigation_role
2024-06-17 12:50:34 +02:00
Hugo van Kemenade
c06f246124 sphinx.ext.extlinks: Add extlink-{name} CSS class to links (#12319) 2024-05-15 04:21:11 +02:00
James Addison
9467bf7849 [typehints] tests: enable mypy for linkcheck builder tests. (#12160) 2024-05-15 04:13:57 +02:00
Adam Turner
173b5912e5 linkcheck: Fix test to use dynamic port numbers 2024-04-24 19:36:36 +01:00
James Addison
2008aa8c78 linkcheck: Store the original (unquoted) anchor (#12206) 2024-04-24 18:07:31 +00:00
James Addison
9ebc46a74f Remove test result sharing between 'test_html5_output' and 'test_html5_download' (#12119) 2024-04-24 07:45:36 +01:00
James Addison
0806a00f05 Support `.jinja` for theme static templates (#11916)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-04-23 10:40:24 +01:00
Nicolas Peugnet
55ca37f684 Add more internationalisation tests (#12277)
- Add test for basic literal block & literalinclude translation
- Add gettext builder test for litteral blocks additional targets
- Add i18n test for xref roles in titles
- Add i18n tests for strange markup
2024-04-23 05:22:43 +01:00
Adam Turner
740b964d45 fixup! Elaborate a little more in the warning message for `config.cache` 2024-04-17 21:50:46 +01:00
James Addison
67303920fe Make the test suite connectivity-agnostic (#12095)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-04-12 23:32:12 +01:00
James Addison
532ad0306e linkcheck: Make the new 'timeout' status opt-in (#12023)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-04-12 23:18:22 +01:00
Adam Turner
3421e5382a Narrow `Generator[T, None, None] types to Iterator[T]` (#12241) 2024-04-09 03:26:44 +01:00
Bénédikt Tran
db4939f007 [misc] update wording of `versionadded to Added in [...]` (#12184)
Motivated by the community feedback, the wording of ``versionadded`` is changed 
from ``New in [...]`` to ``Added in [...]``.
2024-04-05 13:32:55 +02:00
James Addison
df3cde65fa [tests] linkcheck: bind each test HTTP server to a unique port per-testcase (#12126)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-04-04 11:25:53 +02:00
Chris Sewell
430866e029 👌 Add warning log for config values that cannot be cached (#12203)
As a user and/or extension developer, it can be a source of confusion when,
on performing a `sphinx-build` for a cached project, 
an unchanged configuration variable is always marked as changed (triggering a full rebuild).

This is often due to the variable being an unpicklable value,
which is silently omitted from the cache (i.e. the `environment.pickle`).

This commit introduces a specific warning for when a configuration variable is omitted from the cache,
allowing users to understand the root of the problem.
2024-03-27 12:59:24 +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
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
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
d7c94d1696 [cleanup] test utils: more concise BaseHTTPRequestHandler references. (#12158) 2024-03-21 15:08:49 +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
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
danieleades
4f7318767c [lint] extend FURB lints (#12088) 2024-03-17 12:06:39 +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
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
Bénédikt Tran
08386826fb Add tests for `:manpage:` inside a title (#11705) 2024-02-14 10:33:09 +01: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
Adam Turner
1327ec71f2 Fix flake8 in test_build_latex 2024-01-19 03:28:23 +00:00
Adam Turner
38ac67bd6c Use long `re` flags 2024-01-19 02:28:06 +00:00
Adam Turner
183dd51f4d Explode the test matrix for test_build_latex_doc 2024-01-19 02:28:06 +00:00
Adam Turner
4c9364896e Consolidate warnings tests in `test_build_warnings` 2024-01-19 02:28:06 +00:00