Skip to content

Commit 3b8be3a

Browse files
authored
Support Sphinx 7.3 and drop 3.8 support (#163)
1 parent cc42306 commit 3b8be3a

File tree

5 files changed

+34
-38
lines changed

5 files changed

+34
-38
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ jobs:
2424
- "3.11"
2525
- "3.10"
2626
- "3.9"
27-
- "3.8"
2827
steps:
2928
- name: setup python for tox
3029
uses: actions/setup-python@v5
3130
with:
3231
python-version: "3.12"
3332
- name: install tox
34-
run: python -m pip install tox
33+
run: python -m pip install tox-uv
3534
- uses: actions/checkout@v4
3635
- name: setup python for test ${{ matrix.py }}
3736
uses: actions/setup-python@v5

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ repos:
2020
- id: tox-ini-fmt
2121
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
23-
rev: "1.7.0"
23+
rev: "1.8.0"
2424
hooks:
2525
- id: pyproject-fmt
26-
additional_dependencies: ["tox>=4.12.1"]
26+
additional_dependencies: ["tox>=4.14.2"]
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
2828
rev: "v0.3.7"
2929
hooks:

pyproject.toml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.4",
5-
"hatchling>=1.18",
5+
"hatchling>=1.24",
66
]
77

88
[project]
@@ -14,8 +14,8 @@ keywords = [
1414
"sphinx",
1515
]
1616
license = "MIT"
17-
maintainers = [{ name = "Bernat Gabor", email = "[email protected]" }] # noqa: E999
18-
requires-python = ">=3.8"
17+
maintainers = [{ name = "Bernat Gabor", email = "[email protected]" }] # noqa: E999
18+
requires-python = ">=3.9"
1919
classifiers = [
2020
"Development Status :: 5 - Production/Stable",
2121
"Environment :: Console",
@@ -25,7 +25,6 @@ classifiers = [
2525
"License :: OSI Approved :: MIT License",
2626
"Operating System :: OS Independent",
2727
"Programming Language :: Python :: 3 :: Only",
28-
"Programming Language :: Python :: 3.8",
2928
"Programming Language :: Python :: 3.9",
3029
"Programming Language :: Python :: 3.10",
3130
"Programming Language :: Python :: 3.11",
@@ -38,12 +37,13 @@ dynamic = [
3837
"version",
3938
]
4039
dependencies = [
41-
"sphinx>=7.1.2",
40+
"sphinx>=7.3.5",
4241
]
4342
optional-dependencies.test = [
4443
"covdefaults>=2.3",
45-
"pytest>=7.4.3",
46-
"pytest-cov>=4.1",
44+
"defusedxml>=0.7.1", # needed for sphinx.testing
45+
"pytest>=8.1.1",
46+
"pytest-cov>=5",
4747
]
4848
urls.Documentation = "https://github.com/tox-dev/sphinx-argparse-cli#sphinx-argparse-cli"
4949
urls.Homepage = "https://github.com/tox-dev/sphinx-argparse-cli"
@@ -62,33 +62,33 @@ line-length = 120
6262
line-length = 120
6363
target-version = "py38"
6464
lint.select = ["ALL"]
65-
lint.isort = {known-first-party = ["sphinx_argparse_cli"], required-imports = ["from __future__ import annotations"]}
65+
lint.isort = { known-first-party = ["sphinx_argparse_cli"], required-imports = ["from __future__ import annotations"] }
6666
lint.ignore = [
67-
"ANN101", # no type annotation for self
68-
"ANN401", # allow Any as type annotation
69-
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
70-
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
71-
"S104", # Possible binding to all interface
67+
"ANN101", # no type annotation for self
68+
"ANN401", # allow Any as type annotation
69+
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
70+
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
71+
"S104", # Possible binding to all interface
7272
"COM812", # Conflict with formatter
7373
"ISC001", # Conflict with formatter
7474
"CPY", # No copyright statements
7575
]
7676
[tool.ruff.lint.per-file-ignores]
7777
"tests/**/*.py" = [
78-
"S101", # asserts allowed in tests...
79-
"FBT", # don"t care about booleans as positional arguments in tests
80-
"INP001", # no implicit namespace
81-
"D", # don"t care about documentation in tests
82-
"S603", # `subprocess` call: check for execution of untrusted input
83-
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
84-
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
78+
"S101", # asserts allowed in tests...
79+
"FBT", # don"t care about booleans as positional arguments in tests
80+
"INP001", # no implicit namespace
81+
"D", # don"t care about documentation in tests
82+
"S603", # `subprocess` call: check for execution of untrusted input
83+
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
84+
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
8585
"PLR0913", # any number of arguments in tests
8686
"PLR0917", # any number of arguments in tests
8787
"PLC2701", # private import
8888
]
8989
"roots/**/*.py" = [
90-
"INP001", # no namespace
91-
"D", # no docs
90+
"INP001", # no namespace
91+
"D", # no docs
9292
]
9393

9494
[tool.codespell]

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from __future__ import annotations
22

3+
from pathlib import Path
34
from typing import TYPE_CHECKING
45

56
import pytest
67
from docutils import __version__ as docutils_version
78
from sphinx import __display_version__ as sphinx_version
8-
from sphinx.testing.path import path
99

1010
if TYPE_CHECKING:
1111
from _pytest.config import Config
@@ -19,8 +19,8 @@ def pytest_report_header(config: Config) -> str: # noqa: ARG001
1919

2020

2121
@pytest.fixture(scope="session", name="rootdir")
22-
def root_dir() -> path:
23-
return path(__file__).parent.parent.abspath() / "roots"
22+
def root_dir() -> Path:
23+
return Path(__file__).parents[1].absolute() / "roots"
2424

2525

2626
def pytest_configure(config: Config) -> None:

tox.ini

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ env_list =
77
py311
88
py310
99
py39
10-
py38
1110
type
1211
pkg_check
1312
skip_missing_interpreters = true
@@ -32,10 +31,9 @@ commands =
3231

3332
[testenv:fix]
3433
description = run static analysis and style check using flake8
35-
base_python = python3.10
3634
skip_install = true
3735
deps =
38-
pre-commit>=3.5
36+
pre-commit>=3.7
3937
pass_env =
4038
HOMEPATH
4139
PROGRAMDATA
@@ -46,8 +44,8 @@ commands =
4644
[testenv:type]
4745
description = run type check on code base
4846
deps =
49-
mypy==1.7.1
50-
types-docutils>=0.20.0.3
47+
mypy==1.9
48+
types-docutils>=0.20.0.20240406
5149
set_env =
5250
{tty:MYPY_FORCE_COLOR = 1}
5351
commands =
@@ -56,23 +54,22 @@ commands =
5654

5755
[testenv:pkg_check]
5856
description = check that the long description is valid
59-
base_python = python3.10
6057
skip_install = true
6158
deps =
62-
build[virtualenv]>=1.0.3
63-
twine>=4.0.2
59+
build[virtualenv]>=1.2.1
60+
twine>=5
6461
change_dir = {toxinidir}
6562
commands =
6663
python -m build --sdist --wheel -o {envtmpdir} .
6764
twine check {envtmpdir}/*
6865

6966
[testenv:dev]
7067
description = generate a DEV environment
71-
base_python = python3.10
7268
package = editable
7369
extras =
7470
docs
7571
test
7672
commands =
7773
python -m pip list --format=columns
7874
python -c 'import sys; print(sys.executable)'
75+
uv_seed = true

0 commit comments

Comments
 (0)