Skip to content

Commit aad7fc6

Browse files
committed
build: Drop support for Python 3.10
1 parent 35cde4c commit aad7fc6

6 files changed

Lines changed: 9 additions & 41 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ jobs:
3434
- macos-latest
3535
- windows-latest
3636
python-version:
37-
- "3.10"
38-
- "3.14"
37+
- "3.11"
38+
- "3.15"
3939
include:
40-
- os: ubuntu-latest
41-
python-version: "3.11"
4240
- os: ubuntu-latest
4341
python-version: "3.12"
4442
- os: ubuntu-latest
4543
python-version: "3.13"
44+
- os: ubuntu-latest
45+
python-version: "3.14"
4646

4747
runs-on: ${{ matrix.os }}
4848

@@ -98,7 +98,6 @@ jobs:
9898
- macos-latest
9999
- windows-latest
100100
python-version:
101-
- "3.10"
102101
- "3.11"
103102
- "3.12"
104103
- "3.13"

‎pyproject.toml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [{name = "Timothée Mazzucotelli", email = "dev@pawamoy.fr"}]
99
license = "ISC"
1010
license-files = ["LICENSE"]
1111
readme = "README.md"
12-
requires-python = ">=3.10"
12+
requires-python = ">=3.11"
1313
keywords = []
1414
dynamic = ["version"]
1515
classifiers = [
@@ -18,7 +18,6 @@ classifiers = [
1818
"Programming Language :: Python",
1919
"Programming Language :: Python :: 3",
2020
"Programming Language :: Python :: 3 :: Only",
21-
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",
2423
"Programming Language :: Python :: 3.13",
@@ -112,8 +111,6 @@ ci = [
112111
"mkdocs-section-index>=0.3",
113112
"mkdocstrings>=0.29",
114113
"pydantic>=2.10",
115-
# YORE: EOL 3.10: Remove line.
116-
"tomli>=2.0; python_version < '3.11'",
117114
]
118115

119116
[tool.inline-snapshot]

‎scripts/gen_credits.py‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
import os
6-
import sys
76
from collections import defaultdict
87
from collections.abc import Iterable
98
from importlib.metadata import distributions
@@ -12,16 +11,11 @@
1211
from textwrap import dedent
1312
from typing import Union
1413

14+
import tomllib
1515
from jinja2 import StrictUndefined
1616
from jinja2.sandbox import SandboxedEnvironment
1717
from packaging.requirements import Requirement
1818

19-
# YORE: EOL 3.10: Replace block with line 2.
20-
if sys.version_info >= (3, 11):
21-
import tomllib
22-
else:
23-
import tomli as tomllib
24-
2519
project_dir = Path(os.getenv("MKDOCS_CONFIG_DIR", "."))
2620
with project_dir.joinpath("pyproject.toml").open("rb") as pyproject_file:
2721
pyproject = tomllib.load(pyproject_file)

‎scripts/make.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from collections.abc import Iterator
1515

1616

17-
PYTHON_VERSIONS = os.getenv("PYTHON_VERSIONS", "3.10 3.11 3.12 3.13 3.14 3.15").split()
17+
PYTHON_VERSIONS = os.getenv("PYTHON_VERSIONS", "3.11 3.12 3.13 3.14 3.15").split()
1818
PYTHON_DEV = "3.15"
1919

2020

‎src/mkdocstrings_handlers/python/_internal/config.py‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,13 @@
33
from __future__ import annotations
44

55
import re
6-
import sys
76
from dataclasses import field, fields
8-
from typing import TYPE_CHECKING, Annotated, Any, Literal
7+
from typing import TYPE_CHECKING, Annotated, Any, Literal, Self
98

109
from mkdocstrings import get_logger
1110

1211
from mkdocstrings_handlers.python._internal.rendering import Order # noqa: TC001
1312

14-
# YORE: EOL 3.10: Replace block with line 2.
15-
if sys.version_info >= (3, 11):
16-
from typing import Self
17-
else:
18-
from typing_extensions import Self
19-
20-
2113
_logger = get_logger(__name__)
2214

2315
_DEFAULT_FILTERS = ["!^_[^_]"]

‎src/mkdocstrings_handlers/python/_internal/handler.py‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,7 @@
3939
from mkdocs_autorefs import Backlink
4040

4141

42-
# YORE: EOL 3.10: Replace block with line 2.
43-
if sys.version_info >= (3, 11):
44-
from contextlib import chdir
45-
else:
46-
from contextlib import contextmanager
47-
48-
@contextmanager
49-
def chdir(path: str) -> Iterator[None]:
50-
old_wd = os.getcwd()
51-
os.chdir(path)
52-
try:
53-
yield
54-
finally:
55-
os.chdir(old_wd)
56-
42+
from contextlib import chdir
5743

5844
_logger = get_logger(__name__)
5945

0 commit comments

Comments
 (0)