Skip to content

Commit bfcc141

Browse files
committed
Sphinx 8.2 drops 3.10 support
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
1 parent c6e267d commit bfcc141

File tree

6 files changed

+13
-28
lines changed

6 files changed

+13
-28
lines changed

.github/workflows/check.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- "3.13"
2323
- "3.12"
2424
- "3.11"
25-
- "3.10"
2625
- type
2726
- dev
2827
- pkg_meta

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
hooks:
3535
- id: prettier
3636
additional_dependencies:
37-
- prettier@3.4.2
37+
- prettier@3.5.1
3838
- "@prettier/plugin-xml@3.4.1"
3939
- repo: meta
4040
hooks:

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ maintainers = [
2323
authors = [
2424
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
2525
]
26-
requires-python = ">=3.10"
26+
requires-python = ">=3.11"
2727
classifiers = [
2828
"Development Status :: 5 - Production/Stable",
2929
"Framework :: Sphinx :: Extension",
3030
"Intended Audience :: Developers",
3131
"License :: OSI Approved :: MIT License",
3232
"Programming Language :: Python",
3333
"Programming Language :: Python :: 3 :: Only",
34-
"Programming Language :: Python :: 3.10",
3534
"Programming Language :: Python :: 3.11",
3635
"Programming Language :: Python :: 3.12",
3736
"Programming Language :: Python :: 3.13",
@@ -48,9 +47,9 @@ optional-dependencies.docs = [
4847
]
4948
optional-dependencies.testing = [
5049
"covdefaults>=2.3",
51-
"coverage>=7.6.10",
50+
"coverage>=7.6.12",
5251
"defusedxml>=0.7.1", # required by sphinx.testing
53-
"diff-cover>=9.2.1",
52+
"diff-cover>=9.2.3",
5453
"pytest>=8.3.4",
5554
"pytest-cov>=6",
5655
"sphobjinv>=2.3.1.2",
@@ -142,7 +141,7 @@ run.plugins = [
142141
]
143142

144143
[tool.mypy]
145-
python_version = "3.10"
144+
python_version = "3.11"
146145
strict = true
147146
exclude = "^(.*/roots/.*)|(tests/test_integration.*.py)$"
148147
overrides = [

tests/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import re
44
import shutil
55
import sys
6+
from contextlib import suppress
67
from pathlib import Path
78
from typing import TYPE_CHECKING
89

@@ -36,11 +37,9 @@ def _remove_sphinx_projects(sphinx_test_tempdir: Path) -> None:
3637
# the temporary directory area.
3738
# See https://github.com/sphinx-doc/sphinx/issues/4040
3839
for entry in sphinx_test_tempdir.iterdir():
39-
try:
40+
with suppress(PermissionError):
4041
if entry.is_dir() and Path(entry, "_build").exists():
4142
shutil.rmtree(str(entry))
42-
except PermissionError: # noqa: PERF203
43-
pass
4443

4544

4645
@pytest.fixture

tests/test_sphinx_autodoc_typehints.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -554,17 +554,6 @@ class dummy_module.DataClass(x)
554554
assert contents == expected_contents
555555

556556

557-
def maybe_fix_py310(expected_contents: str) -> str:
558-
if sys.version_info >= (3, 11):
559-
return expected_contents
560-
561-
for old, new in [
562-
('"str" | "None"', '"Optional"["str"]'),
563-
]:
564-
expected_contents = expected_contents.replace(old, new)
565-
return expected_contents
566-
567-
568557
@pytest.mark.sphinx("text", testroot="dummy")
569558
@patch("sphinx.writers.text.MAXWIDTH", 2000)
570559
def test_sphinx_output_future_annotations(app: SphinxTestApp, status: StringIO) -> None:
@@ -595,7 +584,7 @@ def test_sphinx_output_future_annotations(app: SphinxTestApp, status: StringIO)
595584
"str"
596585
"""
597586
expected_contents = dedent(expected_contents)
598-
expected_contents = maybe_fix_py310(dedent(expected_contents))
587+
expected_contents = dedent(expected_contents)
599588
assert contents == expected_contents
600589

601590

tox.ini

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
[tox]
22
requires =
3-
tox>=4.23.2
4-
tox-uv>=1.16.2
3+
tox>=4.24.1
4+
tox-uv>=1.24
55
env_list =
66
fix
77
3.13
88
3.12
99
3.11
10-
3.10
1110
type
1211
pkg_meta
1312
skip_missing_interpreters = true
@@ -45,7 +44,7 @@ commands =
4544
[testenv:type]
4645
description = run type check on code base
4746
deps =
48-
mypy==1.14
47+
mypy==1.15
4948
types-docutils>=0.21.0.20241128
5049
commands =
5150
mypy src
@@ -56,8 +55,8 @@ description = check that the long description is valid
5655
skip_install = true
5756
deps =
5857
check-wheel-contents>=0.6.1
59-
twine>=6.0.1
60-
uv>=0.5.11
58+
twine>=6.1
59+
uv>=0.6.1
6160
commands =
6261
uv build --sdist --wheel --out-dir {env_tmp_dir} .
6362
twine check {env_tmp_dir}{/}*

0 commit comments

Comments
 (0)