Skip to content

Commit 04e9e7c

Browse files
committed
Drop support for EOL Python 3.9
1 parent c799028 commit 04e9e7c

File tree

11 files changed

+25
-36
lines changed

11 files changed

+25
-36
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
name: [
33-
"windows-py39",
33+
"windows-py310",
3434
"windows-py314",
3535
"windows-pypy3",
3636

3737
"ubuntu-py310-pytestmain",
38-
"ubuntu-py39",
3938
"ubuntu-py310",
4039
"ubuntu-py311",
4140
"ubuntu-py312",
@@ -46,10 +45,10 @@ jobs:
4645
]
4746

4847
include:
49-
- name: "windows-py39"
50-
python: "3.9"
48+
- name: "windows-py310"
49+
python: "3.10"
5150
os: windows-latest
52-
tox_env: "py39"
51+
tox_env: "py310"
5352
- name: "windows-py313"
5453
python: "3.13"
5554
os: windows-latest
@@ -59,19 +58,14 @@ jobs:
5958
os: windows-latest
6059
tox_env: "py314"
6160
- name: "windows-pypy3"
62-
python: "pypy3.9"
61+
python: "pypy3.11"
6362
os: windows-latest
6463
tox_env: "pypy3"
6564
- name: "ubuntu-py310-pytestmain"
6665
python: "3.10"
6766
os: ubuntu-latest
6867
tox_env: "py310-pytestmain"
6968
use_coverage: true
70-
- name: "ubuntu-py39"
71-
python: "3.9"
72-
os: ubuntu-latest
73-
tox_env: "py39"
74-
use_coverage: true
7569
- name: "ubuntu-py310"
7670
python: "3.10"
7771
os: ubuntu-latest
@@ -97,12 +91,12 @@ jobs:
9791
tox_env: "py314"
9892
use_coverage: true
9993
- name: "ubuntu-pypy3"
100-
python: "pypy3.9"
94+
python: "pypy3.11"
10195
os: ubuntu-latest
10296
tox_env: "pypy3"
10397
use_coverage: true
10498
- name: "ubuntu-benchmark"
105-
python: "3.9"
99+
python: "3.10"
106100
os: ubuntu-latest
107101
tox_env: "benchmark"
108102

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ repos:
2828
rev: v3.21.0
2929
hooks:
3030
- id: pyupgrade
31-
args: [--py39-plus]
31+
args: [--py310-plus]
3232
- repo: https://github.com/asottile/blacken-docs
3333
rev: 1.20.0
3434
hooks:
3535
- id: blacken-docs
36-
additional_dependencies: [black==24.2.0]
36+
additional_dependencies: [black==25.9.0]
3737
- repo: local
3838
hooks:
3939
- id: rst

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ classifiers = [
2424
"Programming Language :: Python :: Implementation :: PyPy",
2525
"Programming Language :: Python :: 3",
2626
"Programming Language :: Python :: 3 :: Only",
27-
"Programming Language :: Python :: 3.9",
2827
"Programming Language :: Python :: 3.10",
2928
"Programming Language :: Python :: 3.11",
3029
"Programming Language :: Python :: 3.12",
@@ -33,7 +32,7 @@ classifiers = [
3332
]
3433
description = "plugin and hook calling mechanisms for python"
3534
readme = {file = "README.rst", content-type = "text/x-rst"}
36-
requires-python = ">=3.9"
35+
requires-python = ">=3.10"
3736

3837
dynamic = ["version"]
3938
[project.optional-dependencies]

src/pluggy/_hooks.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from __future__ import annotations
66

7+
from collections.abc import Callable
78
from collections.abc import Generator
89
from collections.abc import Mapping
910
from collections.abc import Sequence
@@ -12,29 +13,26 @@
1213
import sys
1314
from types import ModuleType
1415
from typing import Any
15-
from typing import Callable
1616
from typing import Final
1717
from typing import final
18-
from typing import Optional
1918
from typing import overload
2019
from typing import TYPE_CHECKING
2120
from typing import TypedDict
2221
from typing import TypeVar
23-
from typing import Union
2422
import warnings
2523

2624
from ._result import Result
2725

2826

2927
_T = TypeVar("_T")
3028
_F = TypeVar("_F", bound=Callable[..., object])
31-
_Namespace = Union[ModuleType, type]
29+
_Namespace = ModuleType | type
3230
_Plugin = object
3331
_HookExec = Callable[
3432
[str, Sequence["HookImpl"], Mapping[str, object], bool],
35-
Union[object, list[object]],
33+
object | list[object],
3634
]
37-
_HookImplFunction = Callable[..., Union[_T, Generator[None, Result[_T], None]]]
35+
_HookImplFunction = Callable[..., _T | Generator[None, Result[_T], None]]
3836

3937

4038
class HookspecOpts(TypedDict):
@@ -374,7 +372,7 @@ def __getattr__(self, name: str) -> HookCaller: ...
374372
_HookRelay = HookRelay
375373

376374

377-
_CallHistory = list[tuple[Mapping[str, object], Optional[Callable[[Any], None]]]]
375+
_CallHistory = list[tuple[Mapping[str, object], Callable[[Any], None] | None]]
378376

379377

380378
class HookCaller:

src/pluggy/_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from __future__ import annotations
22

3+
from collections.abc import Callable
34
from collections.abc import Iterable
45
from collections.abc import Mapping
56
from collections.abc import Sequence
67
import inspect
78
import types
89
from typing import Any
9-
from typing import Callable
1010
from typing import cast
1111
from typing import Final
1212
from typing import TYPE_CHECKING

src/pluggy/_result.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44

55
from __future__ import annotations
66

7+
from collections.abc import Callable
78
from types import TracebackType
8-
from typing import Callable
99
from typing import cast
1010
from typing import final
1111
from typing import Generic
12-
from typing import Optional
1312
from typing import TypeVar
1413

1514

16-
_ExcInfo = tuple[type[BaseException], BaseException, Optional[TracebackType]]
15+
_ExcInfo = tuple[type[BaseException], BaseException, TracebackType | None]
1716
ResultType = TypeVar("ResultType")
1817

1918

src/pluggy/_tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
from __future__ import annotations
66

7+
from collections.abc import Callable
78
from collections.abc import Sequence
89
from typing import Any
9-
from typing import Callable
1010

1111

1212
_Writer = Callable[[str], object]

testing/test_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
from collections.abc import Callable
12
from functools import wraps
23
from typing import Any
3-
from typing import Callable
44
from typing import cast
55
from typing import TypeVar
66

testing/test_hookcaller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
from collections.abc import Callable
12
from collections.abc import Generator
23
from collections.abc import Sequence
3-
from typing import Callable
44
from typing import TypeVar
55

66
import pytest

testing/test_multicall.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
from collections.abc import Callable
12
from collections.abc import Mapping
23
from collections.abc import Sequence
3-
from typing import Callable
4-
from typing import Union
54

65
import pytest
76

@@ -20,7 +19,7 @@ def MC(
2019
methods: Sequence[Callable[..., object]],
2120
kwargs: Mapping[str, object],
2221
firstresult: bool = False,
23-
) -> Union[object, list[object]]:
22+
) -> object | list[object]:
2423
caller = _multicall
2524
hookfuncs = []
2625
for method in methods:

0 commit comments

Comments
 (0)