Skip to content

Commit b0a0e6f

Browse files
authored
Merge branch 'master' into c-domain-entries
2 parents fdc0e14 + e6d67ca commit b0a0e6f

File tree

7 files changed

+32
-11
lines changed

7 files changed

+32
-11
lines changed

doc/man/sphinx-build.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ Options
272272
From Sphinx 8.1, :option:`!--keep-going` is always enabled.
273273
Previously, it was only applicable whilst using :option:`--fail-on-warning`,
274274
which by default exited :program:`sphinx-build` on the first warning.
275-
Using :option:`!--keep-going` runs :program:`!sphinx-build` to completion
275+
Using :option:`!--keep-going` runs :program:`sphinx-build` to completion
276276
and exits with exit status 1 if errors are encountered.
277277

278278
.. versionadded:: 1.8
279279
.. versionchanged:: 8.1
280280
:program:`sphinx-build` no longer exits on the first warning,
281-
meaning that in effect :option:`!--fail-on-warning` is always enabled.
281+
meaning that in effect :option:`!--keep-going` is always enabled.
282282
The option is retained for compatibility, but may be removed at some
283283
later date.
284284

pyproject.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ docs = [
9292
"sphinxcontrib-websupport",
9393
]
9494
lint = [
95-
"ruff==0.11.7",
95+
"ruff==0.11.9",
9696
"mypy==1.15.0",
9797
"sphinx-lint>=0.9",
9898
"types-colorama==0.4.15.20240311",
@@ -135,7 +135,7 @@ docs = [
135135
"sphinxcontrib-websupport",
136136
]
137137
lint = [
138-
"ruff==0.11.7",
138+
"ruff==0.11.9",
139139
"sphinx-lint>=0.9",
140140
]
141141
package = [
@@ -290,7 +290,6 @@ module = [
290290
"tests.test_util.test_util",
291291
"tests.test_util.test_util_display",
292292
"tests.test_util.test_util_docutils",
293-
"tests.test_util.test_util_images",
294293
"tests.test_util.test_util_inventory",
295294
# tests/test_writers
296295
"tests.test_writers.test_docutilsconf",

tests/roots/test-ext-autodoc/target/need_mocks.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import missing_module
22
import missing_package1.missing_module1
3+
import sphinx.missing_module4
34
from missing_module import missing_name
45
from missing_package2 import missing_module2
56
from missing_package3.missing_module3 import missing_name # NoQA: F811
6-
7-
import sphinx.missing_module4
87
from sphinx.missing_module4 import missing_name2
98

109

tests/test_builders/test_build_linkcheck.py

+6
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,12 @@ def test_too_many_requests_retry_after_HTTP_date(tz, app, monkeypatch, capsys):
11271127
) as address:
11281128
app.build()
11291129

1130+
# Undo side-effects: the monkeypatch context manager clears the TZ environment
1131+
# variable, but we also need to reset Python's internal notion of the current
1132+
# timezone.
1133+
if sys.platform != 'win32':
1134+
time.tzset()
1135+
11301136
content = (app.outdir / 'output.json').read_text(encoding='utf8')
11311137
assert json.loads(content) == {
11321138
'filename': 'index.rst',

tests/test_extensions/test_ext_autodoc.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,14 @@ def test_autodoc_special_members(app):
938938
}
939939
if sys.version_info >= (3, 13, 0, 'alpha', 5):
940940
options['exclude-members'] = '__static_attributes__,__firstlineno__'
941+
if sys.version_info >= (3, 14, 0, 'alpha', 7):
942+
ann_attr_name = '__annotations_cache__'
943+
else:
944+
ann_attr_name = '__annotations__'
941945
actual = do_autodoc(app, 'class', 'target.Class', options)
942946
assert list(filter(lambda l: '::' in l, actual)) == [
943947
'.. py:class:: Class(arg)',
944-
' .. py:attribute:: Class.__annotations__',
948+
f' .. py:attribute:: Class.{ann_attr_name}',
945949
' .. py:attribute:: Class.__dict__',
946950
' .. py:method:: Class.__init__(arg)',
947951
' .. py:attribute:: Class.__module__',

tests/test_extensions/test_ext_autodoc_configs.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,11 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
13481348
# default
13491349
options = {'members': None}
13501350
actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)
1351+
attr2_typeinfo: tuple[str, ...]
1352+
if sys.version_info >= (3, 14, 0, 'alpha', 7):
1353+
attr2_typeinfo = ()
1354+
else:
1355+
attr2_typeinfo = (' :type: int',)
13511356
assert list(actual) == [
13521357
'',
13531358
'.. py:module:: target.autodoc_type_aliases',
@@ -1368,7 +1373,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
13681373
'',
13691374
' .. py:attribute:: Foo.attr2',
13701375
' :module: target.autodoc_type_aliases',
1371-
' :type: int',
1376+
*attr2_typeinfo,
13721377
'',
13731378
' docstring',
13741379
'',
@@ -1421,6 +1426,10 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
14211426
'io.StringIO': 'my.module.StringIO',
14221427
}
14231428
actual = do_autodoc(app, 'module', 'target.autodoc_type_aliases', options)
1429+
if sys.version_info >= (3, 14, 0, 'alpha', 7):
1430+
attr2_typeinfo = ()
1431+
else:
1432+
attr2_typeinfo = (' :type: myint',)
14241433
assert list(actual) == [
14251434
'',
14261435
'.. py:module:: target.autodoc_type_aliases',
@@ -1441,7 +1450,7 @@ def test_autodoc_type_aliases(app: SphinxTestApp) -> None:
14411450
'',
14421451
' .. py:attribute:: Foo.attr2',
14431452
' :module: target.autodoc_type_aliases',
1444-
' :type: myint',
1453+
*attr2_typeinfo,
14451454
'',
14461455
' docstring',
14471456
'',

tests/test_util/test_util_images.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111
parse_data_uri,
1212
)
1313

14+
TYPE_CHECKING = False
15+
if TYPE_CHECKING:
16+
from pathlib import Path
17+
1418
GIF_FILENAME = 'img.gif'
1519
PNG_FILENAME = 'img.png'
1620
PDF_FILENAME = 'img.pdf'
1721
TXT_FILENAME = 'index.txt'
1822

1923

20-
def test_get_image_size(rootdir):
24+
def test_get_image_size(rootdir: Path) -> None:
2125
assert get_image_size(rootdir / 'test-root' / GIF_FILENAME) == (200, 181)
2226
assert get_image_size(rootdir / 'test-root' / PNG_FILENAME) == (200, 181)
2327
assert get_image_size(rootdir / 'test-root' / PDF_FILENAME) is None

0 commit comments

Comments
 (0)