Adam Turner
40f8693661
Add `sphinx.util._uri
`
2024-10-05 16:47:26 +01:00
Adam Turner
a0fe15c00d
Report GIL status in pytest
2024-10-04 16:55:39 +01:00
Adam Turner
dd17d4faa5
Bump types-docutils to 0.21.0.20241004 ( #12960 )
2024-10-04 15:41:25 +01:00
Adam Turner
be52db2bb3
Support placeholders for years in copyright ( #12910 )
2024-10-04 13:52:29 +01:00
Adam Turner
3677dd1bca
Shorten `copyright
` in the ChangesBuilder tests
2024-10-04 12:33:03 +01:00
Adam Turner
7195d9a662
Remove copyright and licence comments from theme asset files
2024-10-04 12:31:45 +01:00
Adam Turner
45273f292e
Remove titles from theme assets
2024-10-04 12:27:26 +01:00
James Addison
a84f7009ac
Restrict substitution of `copyright
` years ( #12516 )
...
Only substitute copyright notice years with values from
``SOURCE_DATE_EPOCH`` for entries that match the current
system clock year, and disallow substitution of future years.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-04 10:48:47 +01:00
Adam Turner
5f3846f8c6
Improve testing for copyright year substitution ( #12950 )
2024-10-03 21:56:50 +01:00
danieleades
7546545876
Further improve typing in tests/
( #12816 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-03 20:17:40 +01:00
James Addison
80c4b65a2a
apidoc: Restore support for legacy '_t'-suffix template files ( #12929 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-10-03 00:21:03 +01:00
James Addison
abb3ead01a
tests: text builder: resolve an ordering conflict between two section-number-related tests ( #12868 )
2024-09-28 19:23:25 +02:00
khanxmetu
0a162fa8da
i18n: disable default smartquotes for zh_CN
and zh_TW
( #12875 )
2024-09-28 00:18:54 +02:00
Adam Dangoor
7487e764cb
Resolve a few mypy issues in tests ( #12912 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-25 08:57:11 +01:00
Adam Turner
45b7ebdc17
Allow using GMT in the HTML last updated format ( #12907 )
2024-09-22 07:55:09 +01:00
Adam Turner
76110c3ea0
Add `_DomainsContainer
` for better static typing ( #12783 )
...
Co-authored-by: Daniel Eades <danieleades@hotmail.com>
2024-09-18 03:50:27 +01:00
Adam Turner
71b1a06024
Fix tests for Docutils revision 9928 ( #12897 )
2024-09-18 02:10:10 +01:00
khanxmetu
e4e78b3e1c
Fix mypy failures in intersphinx ( #12879 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-09-18 01:23:00 +01:00
Adam Dangoor
15aadd6e1a
Change the language type given to CatalogRepository
in tests ( #12853 )
2024-09-02 14:41:34 +01:00
Adam Dangoor
6a07bfcb78
Remove unused `app
fixture passed to
test_util_rst
` tests ( #12840 )
2024-08-31 08:12:16 +01:00
Adam Dangoor
c00388f509
Remove unused monkeypatch fixtures ( #12841 )
2024-08-31 07:48:08 +01:00
Adam Dangoor
7b6f76b61c
Remove an unused function in a test ( #12839 )
2024-08-31 07:47:16 +01:00
Adam Dangoor
b5617c0d15
Remove unused `make_app
` fixtures ( #12842 )
2024-08-31 07:46:38 +01:00
Adam Dangoor
678704fde6
Fix CalledProcessError attribute access in tests ( #12838 )
2024-08-31 07:37:42 +01:00
Jean-François B.
447cd1ab1e
LaTeX: Fix #12735 about siglines with typing but no parameter list ( #12737 )
2024-08-24 21:48:51 +02:00
Bénédikt Tran
1852d0f087
intersphinx: Fix double forward slashes in inventory urls ( #12807 )
2024-08-22 10:11:12 +01:00
Jean-François B.
1c131dfffe
LaTeX: make contents, topic, and sidebar separately customizable ( #12704 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-19 20:43:47 +02:00
Thomas Fanning
e0f2009346
LaTeX: Add math_numsep
support to latex builder ( #12652 )
...
Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
2024-08-18 21:34:20 +02:00
Jean-François B.
4c7fe10a4b
LaTeX: fix mark-up when \DUrole is used with multiple classes ( #12745 )
2024-08-17 20:33:15 +02:00
Adam Turner
334e69fbb4
Test command line argument parsing ( #12795 )
2024-08-17 02:53:48 +01:00
Adam Turner
2e1415cf6c
Use `headlessFirefox
` and update to Node 20 ( #12794 )
2024-08-16 23:18:24 +00:00
Adam Dangoor
ae8b37793d
Improve typing for `mocksvgconverter.py
` ( #12788 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-16 22:35:32 +01:00
Adam Turner
76ead8737d
Bump Ruff to 0.6.0
2024-08-15 21:42:32 +01:00
Adam Turner
eb6ff0a258
Increase test independence by using the basic theme ( #12776 )
2024-08-14 20:45:33 +01:00
Adam Turner
fadb6b10cb
Stop exiting early with `--fail-on-warnings
; add
--exception-on-warning
` ( #12743 )
...
Co-authored-by: Jeremy Maitin-Shepard <jbms@google.com>
2024-08-13 17:12:42 +01:00
Adam Turner
0b17bb1029
Always define the builder and `testroot
when using the
app
` fixtureture ( #12775 )
2024-08-12 22:34:03 +01:00
Adam Turner
03b9134ee0
Short-circuit HTTP requests in tests ( #12772 )
2024-08-12 03:49:58 +01:00
James Addison
0bfaadf6c9
singlehtml: Use same-document hyperlinks for internal project references ( #12551 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-08-11 22:43:48 +01:00
Jeremy Bowman
0cbdd98ffb
Correctly support custom gettext output templates ( #12645 )
...
Co-authored-by: Jeremy Bowman <jmbowman@alum.mit.edu>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-08-11 20:34:04 +01:00
Tim Hoffmann
646a5d7482
Support type-dependent search result highlighting via CSS ( #12474 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
2024-08-11 20:22:21 +01:00
Adam Turner
d39ba32604
Add `sphinx.util._importer
` ( #12762 )
2024-08-11 17:24:26 +01:00
James Addison
655d1c7213
intersphinx: Reduce log message severity when an ambiguous target resolves to a duplicate ( #12587 )
2024-08-11 17:22:37 +01:00
Adam Turner
ed7a980b34
Fix test formatting
2024-08-11 16:58:19 +01:00
James Addison
999baca135
Mention dynamically-evaluated templates whilst copying static files ( #12726 )
2024-08-11 16:37:41 +01:00
James Addison
3bab3248e5
HTML search: Add test coverage & introduce test module file suffix ( #12759 )
2024-08-11 15:13:14 +01:00
Adam Turner
d03156e078
Format `tests/
` ( #12760 )
2024-08-11 14:58:56 +01:00
Adam Turner
620e434f65
Improve string concatenation ( #12758 )
...
Use implicit concatenation over ``+``, and combine some implicit concatenations
to a single string literal.
2024-08-11 00:39:35 +01:00
Adam Turner
18fbced7e0
Reduce the formatter's target line length to 88 ( #12757 )
2024-08-11 00:19:50 +01:00
James Addison
e3238260f6
Migrate JavaScript tests from Karma to the Jasmine framework ( #12754 )
2024-08-10 00:18:27 +01:00
Jean-François B.
586c0cd178
Revert "Mark `test_build_manpage
` as XFAIL following changes in Docutils master" ( #12734 )
...
This reverts commit 1ed4ca7
.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-07 16:04:07 +01:00
Chris Sewell
05cc39d9b2
[rst] Improve unreferenced footnote warnings ( #12730 )
...
The previous `UnreferencedFootnotesDetector` transform was untested and missed warnings for a number of cases.
This commit adds a test, to cover a reasonable range of scenarios,
then changes how the detection works to pass this test.
The transform now runs just after the docutils `Footnote` resolution transform
(changing its priority from 200 to 622)
then simply check for any footnotes without "back-references".
2024-08-05 10:28:13 +02:00
Shengyu Zhang
03d684fe9f
intersphinx: Handle a negative `intersphinx_cache_limit
` ( #12514 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-31 08:16:10 +01:00
Adam Turner
cee9efc0ab
Use `classmethod
` for a class method
2024-07-30 01:51:27 +01:00
Adam Turner
d0915ab25b
Fix mypy
2024-07-30 01:12:28 +01:00
Adam Turner
865b513cf2
Patch `pygments.Formatter.__class_getitem__
` in Pygments 2.17
2024-07-30 01:11:34 +01:00
Adam Turner
a4102a7507
Specify encoding to avoid EncodingWarning
2024-07-29 18:21:01 +01:00
Adam Turner
5f110f0fa0
Fix test failures following Alabaster's change in default sidebars
2024-07-26 23:16:18 +01:00
Adam Turner
b511537597
`_StrPath
is dead; long live
_StrPath
` ( #12690 )
2024-07-26 17:33:55 +01:00
Adam Turner
46671f2e10
intersphinx: Add a type for project data ( #12657 )
2024-07-23 23:17:58 +01:00
danieleades
f09bc62969
Shrink mypy exclude list ( #12669 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-23 22:19:15 +01:00
Adam Turner
7c4db269af
Normalise `sys.path
` manipulation in tests ( #12665 )
2024-07-23 16:55:21 +01:00
Adam Turner
1c682bc3ba
Remove `_typing_internal_name
` ( #12664 )
2024-07-23 16:10:10 +01:00
Adam Turner
1f2891530d
Use `app.status
and
app.warning
` in tests ( #12663 )
2024-07-23 15:35:55 +01:00
Adam Turner
57a63ea603
Use more precise last-modified times for files ( #12661 )
2024-07-23 14:52:31 +01:00
Adam Turner
de15d61a46
Use pathlib in `sphinx.project
`
2024-07-23 04:52:32 +01:00
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