Skip to content

Commit a7f425e

Browse files
brianschubertmingyu.park
authored and
mingyu.park
committed
Drop Python 3.8 support in typeshed utilities (python#13774)
1 parent 7026564 commit a7f425e

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

lib/ts_utils/metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from collections.abc import Mapping
1111
from dataclasses import dataclass
1212
from pathlib import Path
13-
from typing import Final, NamedTuple, final
14-
from typing_extensions import Annotated, TypeGuard
13+
from typing import Annotated, Final, NamedTuple, final
14+
from typing_extensions import TypeGuard
1515

1616
import tomli
1717
import tomlkit

lib/ts_utils/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Iterable, Mapping
88
from functools import lru_cache
99
from pathlib import Path
10-
from typing import Any, Dict, Final, NamedTuple, Tuple
10+
from typing import Any, Final, NamedTuple
1111
from typing_extensions import TypeAlias
1212

1313
import pathspec
@@ -111,8 +111,8 @@ def get_mypy_req() -> str:
111111
# Parsing the stdlib/VERSIONS file
112112
# ====================================================================
113113

114-
VersionTuple: TypeAlias = Tuple[int, int]
115-
SupportedVersionsDict: TypeAlias = Dict[str, Tuple[VersionTuple, VersionTuple]]
114+
VersionTuple: TypeAlias = tuple[int, int]
115+
SupportedVersionsDict: TypeAlias = dict[str, tuple[VersionTuple, VersionTuple]]
116116

117117
VERSIONS_PATH = STDLIB_PATH / "VERSIONS"
118118
VERSION_LINE_RE = re.compile(r"^([a-zA-Z_][a-zA-Z0-9_.]*): ([23]\.\d{1,2})-([23]\.\d{1,2})?$")

scripts/sync_protobuf/_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
import subprocess
44
import sys
5+
from collections.abc import Iterable
56
from http.client import HTTPResponse
6-
from typing import TYPE_CHECKING, Iterable
7+
from typing import TYPE_CHECKING
78
from urllib.request import urlopen
89
from zipfile import ZipFile
910

tests/mypy_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from itertools import product
1919
from pathlib import Path
2020
from threading import Lock
21-
from typing import Any, NamedTuple
22-
from typing_extensions import Annotated, TypeAlias
21+
from typing import Annotated, Any, NamedTuple
22+
from typing_extensions import TypeAlias
2323

2424
import tomli
2525
from packaging.requirements import Requirement

0 commit comments

Comments
 (0)