Skip to content

Commit 2907379

Browse files
committed
build: Drop support for Python 3.8
1 parent e6f429e commit 2907379

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 2 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.8"
12+
requires-python = ">=3.9"
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.8",
2221
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",

src/mkdocstrings_handlers/python/debug.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import sys
66
from dataclasses import dataclass
77
from importlib import metadata
8-
from typing import List, Tuple
98

109

1110
@dataclass
@@ -38,13 +37,13 @@ class Environment:
3837
"""Python interpreter version."""
3938
platform: str
4039
"""Operating System."""
41-
packages: List[Package]
40+
packages: list[Package]
4241
"""Installed packages."""
43-
variables: List[Variable]
42+
variables: list[Variable]
4443
"""Environment variables."""
4544

4645

47-
def _interpreter_name_version() -> Tuple[str, str]:
46+
def _interpreter_name_version() -> tuple[str, str]:
4847
if hasattr(sys, "implementation"):
4948
impl = sys.implementation.version
5049
version = f"{impl.major}.{impl.minor}.{impl.micro}"

src/mkdocstrings_handlers/python/handler.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
import sys
1010
import traceback
1111
from collections import ChainMap
12+
from collections.abc import Iterator, Mapping, MutableMapping
13+
from pathlib import Path
1214
from subprocess import PIPE, Popen
13-
from typing import Any, BinaryIO, ClassVar, Iterator, List, Mapping, MutableMapping, Optional, Tuple
15+
from typing import Any, BinaryIO, ClassVar, Optional
1416

1517
from markdown import Markdown
1618
from mkdocstrings.extension import PluginError
@@ -200,7 +202,7 @@ def load_inventory(
200202
url: str,
201203
base_url: Optional[str] = None,
202204
**kwargs: Any, # noqa: ARG003
203-
) -> Iterator[Tuple[str, str]]:
205+
) -> Iterator[tuple[str, str]]:
204206
"""Yield items and their URLs from an inventory file streamed from `in_file`.
205207
206208
This implements mkdocstrings' `load_inventory` "protocol" (see plugin.py).
@@ -324,7 +326,7 @@ def render(self, data: CollectorItem, config: Mapping[str, Any]) -> str: # noqa
324326
**{"config": final_config, data["category"]: data, "heading_level": heading_level, "root": True},
325327
)
326328

327-
def get_anchors(self, data: CollectorItem) -> Tuple[str, ...]: # noqa: D102 (ignore missing docstring)
329+
def get_anchors(self, data: CollectorItem) -> tuple[str, ...]: # noqa: D102 (ignore missing docstring)
328330
try:
329331
return (data["path"],)
330332
except KeyError:

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
from __future__ import annotations
44

55
from collections import ChainMap
6-
from typing import TYPE_CHECKING, Iterator
6+
from typing import TYPE_CHECKING
77

88
import pytest
99
from markdown.core import Markdown
1010
from mkdocs.config.defaults import MkDocsConfig
1111

1212
if TYPE_CHECKING:
13+
from collections.abc import Iterator
1314
from pathlib import Path
1415

1516
from mkdocstrings.extension import MkdocstringsExtension
@@ -78,4 +79,4 @@ def fixture_ext_markdown(plugin: MkdocstringsPlugin) -> MkdocstringsExtension:
7879
Returns:
7980
The plugin Markdown instance.
8081
"""
81-
return plugin.md # type: ignore[attr-defined]
82+
return plugin.md

0 commit comments

Comments
 (0)