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'])
```
This commit is contained in:
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -34,8 +34,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
tox_env:
|
tox_env:
|
||||||
- "py38-pytestmin"
|
- "py39-pytestmin"
|
||||||
- "py38-pytestlatest"
|
|
||||||
- "py39-pytestlatest"
|
- "py39-pytestlatest"
|
||||||
- "py310-pytestlatest"
|
- "py310-pytestlatest"
|
||||||
- "py311-pytestlatest"
|
- "py311-pytestlatest"
|
||||||
@@ -47,10 +46,8 @@ jobs:
|
|||||||
|
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
include:
|
include:
|
||||||
- tox_env: "py38-pytestmin"
|
- tox_env: "py39-pytestmin"
|
||||||
python: "3.8"
|
python: "3.9"
|
||||||
- tox_env: "py38-pytestlatest"
|
|
||||||
python: "3.8"
|
|
||||||
- tox_env: "py39-pytestlatest"
|
- tox_env: "py39-pytestlatest"
|
||||||
python: "3.9"
|
python: "3.9"
|
||||||
- tox_env: "py310-pytestlatest"
|
- tox_env: "py310-pytestlatest"
|
||||||
|
|||||||
1
changelog/1162.removal.rst
Normal file
1
changelog/1162.removal.rst
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Dropped support for EOL Python 3.8.
|
||||||
@@ -25,14 +25,13 @@ classifiers = [
|
|||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3 :: Only",
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
"Programming Language :: Python :: 3.8",
|
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
"Programming Language :: Python :: 3.12",
|
"Programming Language :: Python :: 3.12",
|
||||||
"Programming Language :: Python :: 3.13",
|
"Programming Language :: Python :: 3.13",
|
||||||
]
|
]
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"execnet>=2.1",
|
"execnet>=2.1",
|
||||||
"pytest>=7.0.0",
|
"pytest>=7.0.0",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
from collections.abc import Iterator
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import Iterator
|
|
||||||
|
|
||||||
|
|
||||||
def visit_path(
|
def visit_path(
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
from enum import auto
|
from enum import auto
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from queue import Empty
|
from queue import Empty
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
import sys
|
import sys
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Sequence
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import execnet
|
import execnet
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ the controlling process which should best never happen.
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Sequence
|
|
||||||
|
|
||||||
from _pytest._io import TerminalWriter
|
from _pytest._io import TerminalWriter
|
||||||
import execnet
|
import execnet
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ must be taken in plugins in case ``xdist`` is not installed. Please see:
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
import os
|
import os
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Sequence
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import execnet
|
import execnet
|
||||||
|
|||||||
@@ -9,16 +9,16 @@ needs not to be installed in remote environments.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
from collections.abc import Generator
|
||||||
|
from collections.abc import Iterable
|
||||||
|
from collections.abc import Sequence
|
||||||
import contextlib
|
import contextlib
|
||||||
import enum
|
import enum
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Generator
|
|
||||||
from typing import Iterable
|
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
from typing import Sequence
|
|
||||||
from typing import TypedDict
|
from typing import TypedDict
|
||||||
from typing import Union
|
from typing import Union
|
||||||
import warnings
|
import warnings
|
||||||
@@ -98,7 +98,7 @@ class TestQueue:
|
|||||||
self._items = collections.deque(iterable)
|
self._items = collections.deque(iterable)
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def lock(self) -> Generator[collections.deque[Item], None, None]:
|
def lock(self) -> Generator[collections.deque[Item]]:
|
||||||
with self._lock:
|
with self._lock:
|
||||||
try:
|
try:
|
||||||
yield self._items
|
yield self._items
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
from difflib import unified_diff
|
from difflib import unified_diff
|
||||||
from typing import Sequence
|
|
||||||
|
|
||||||
|
|
||||||
def report_collection_diff(
|
def report_collection_diff(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import Sequence
|
from collections.abc import Sequence
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
from itertools import cycle
|
from itertools import cycle
|
||||||
from typing import Sequence
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from collections.abc import Sequence
|
||||||
from typing import NoReturn
|
from typing import NoReturn
|
||||||
from typing import Sequence
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
from typing import Protocol
|
from typing import Protocol
|
||||||
from typing import Sequence
|
|
||||||
|
|
||||||
from xdist.workermanage import WorkerController
|
from xdist.workermanage import WorkerController
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
from typing import NamedTuple
|
from typing import NamedTuple
|
||||||
from typing import Sequence
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
import enum
|
import enum
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
@@ -9,7 +10,6 @@ import sys
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
from typing import Sequence
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
import uuid
|
import uuid
|
||||||
import warnings
|
import warnings
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Generator
|
||||||
import shutil
|
import shutil
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import Generator
|
|
||||||
|
|
||||||
import execnet
|
import execnet
|
||||||
import pytest
|
import pytest
|
||||||
@@ -12,7 +12,7 @@ pytest_plugins = "pytester"
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def _divert_atexit(monkeypatch: pytest.MonkeyPatch) -> Generator[None, None, None]:
|
def _divert_atexit(monkeypatch: pytest.MonkeyPatch) -> Generator[None]:
|
||||||
import atexit
|
import atexit
|
||||||
|
|
||||||
finalizers = []
|
finalizers = []
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import cast
|
from typing import cast
|
||||||
from typing import Sequence
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import execnet
|
import execnet
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import sys
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import cast
|
from typing import cast
|
||||||
from typing import Dict
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@@ -90,7 +89,7 @@ def worker(request: pytest.FixtureRequest, pytester: pytest.Pytester) -> WorkerS
|
|||||||
|
|
||||||
class TestWorkerInteractor:
|
class TestWorkerInteractor:
|
||||||
UnserializerReport = Callable[
|
UnserializerReport = Callable[
|
||||||
[Dict[str, Any]], Union[pytest.CollectReport, pytest.TestReport]
|
[dict[str, Any]], Union[pytest.CollectReport, pytest.TestReport]
|
||||||
]
|
]
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|||||||
Reference in New Issue
Block a user