Skip to content

Commit 39c62b3

Browse files
authored
Drop EOL Python 3.8 support (#1162)
* Drop EOL Python 3.8 support * Run pyupgrade --py39-plus on all files * Revert using direct annotations in looponfail.py We need to use string annotations otherwise we get this error: ``` ValueError: ("the use of non-builtin globals isn't supported", ['execnet', 'Any']) ```
2 parents c3d7b77 + 31bee7c commit 39c62b3

File tree

19 files changed

+25
-29
lines changed

19 files changed

+25
-29
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
tox_env:
37-
- "py38-pytestmin"
38-
- "py38-pytestlatest"
37+
- "py39-pytestmin"
3938
- "py39-pytestlatest"
4039
- "py310-pytestlatest"
4140
- "py311-pytestlatest"
@@ -47,10 +46,8 @@ jobs:
4746

4847
os: [ubuntu-latest, windows-latest]
4948
include:
50-
- tox_env: "py38-pytestmin"
51-
python: "3.8"
52-
- tox_env: "py38-pytestlatest"
53-
python: "3.8"
49+
- tox_env: "py39-pytestmin"
50+
python: "3.9"
5451
- tox_env: "py39-pytestlatest"
5552
python: "3.9"
5653
- tox_env: "py310-pytestlatest"

changelog/1162.removal.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dropped support for EOL Python 3.8.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ classifiers = [
2525
"Programming Language :: Python",
2626
"Programming Language :: Python :: 3",
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",
3231
"Programming Language :: Python :: 3.12",
3332
"Programming Language :: Python :: 3.13",
3433
]
35-
requires-python = ">=3.8"
34+
requires-python = ">=3.9"
3635
dependencies = [
3736
"execnet>=2.1",
3837
"pytest>=7.0.0",

src/xdist/_path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
from collections.abc import Iterator
12
from itertools import chain
23
import os
34
from pathlib import Path
45
from typing import Callable
5-
from typing import Iterator
66

77

88
def visit_path(

src/xdist/dsession.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 Sequence
34
from enum import auto
45
from enum import Enum
56
from queue import Empty
67
from queue import Queue
78
import sys
89
from typing import Any
9-
from typing import Sequence
1010
import warnings
1111

1212
import execnet

src/xdist/looponfail.py

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

1010
from __future__ import annotations
1111

12+
from collections.abc import Sequence
1213
import os
1314
from pathlib import Path
1415
import sys
1516
import time
1617
from typing import Any
17-
from typing import Sequence
1818

1919
from _pytest._io import TerminalWriter
2020
import execnet

src/xdist/newhooks.py

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

1515
from __future__ import annotations
1616

17+
from collections.abc import Sequence
1718
import os
1819
from typing import Any
19-
from typing import Sequence
2020
from typing import TYPE_CHECKING
2121

2222
import execnet

src/xdist/remote.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
from __future__ import annotations
1010

1111
import collections
12+
from collections.abc import Generator
13+
from collections.abc import Iterable
14+
from collections.abc import Sequence
1215
import contextlib
1316
import enum
1417
import os
1518
import sys
1619
import time
1720
from typing import Any
18-
from typing import Generator
19-
from typing import Iterable
2021
from typing import Literal
21-
from typing import Sequence
2222
from typing import TypedDict
2323
from typing import Union
2424
import warnings
@@ -98,7 +98,7 @@ def replace(self, iterable: Iterable[Item]) -> None:
9898
self._items = collections.deque(iterable)
9999

100100
@contextlib.contextmanager
101-
def lock(self) -> Generator[collections.deque[Item], None, None]:
101+
def lock(self) -> Generator[collections.deque[Item]]:
102102
with self._lock:
103103
try:
104104
yield self._items

src/xdist/report.py

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

3+
from collections.abc import Sequence
34
from difflib import unified_diff
4-
from typing import Sequence
55

66

77
def report_collection_diff(

src/xdist/scheduler/each.py

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

3-
from typing import Sequence
3+
from collections.abc import Sequence
44

55
import pytest
66

0 commit comments

Comments
 (0)