Skip to content

Commit 977f300

Browse files
authored
Remove Python 3.8 exclusive branches (#13772)
1 parent 2772945 commit 977f300

File tree

4 files changed

+15
-32
lines changed

4 files changed

+15
-32
lines changed

stubs/icalendar/icalendar/timezone/zoneinfo.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
import datetime
2-
import sys
32
from typing import Final, Literal
3+
from zoneinfo import ZoneInfo
44

55
from dateutil.rrule import rrule, rruleset
66

7-
if sys.version_info >= (3, 9):
8-
from zoneinfo import ZoneInfo
9-
else:
10-
from backports.zoneinfo import ZoneInfo
11-
127
from ..cal import Timezone
138
from ..prop import vRecur
149
from .provider import TZProvider

stubs/mypy-extensions/mypy_extensions.pyi

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import abc
2-
import sys
32
from _collections_abc import dict_items, dict_keys, dict_values
43
from _typeshed import IdentityFunction, Unused
54
from collections.abc import Mapping
@@ -27,17 +26,16 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
2726
def keys(self) -> dict_keys[str, object]: ...
2827
def values(self) -> dict_values[str, object]: ...
2928
def __delitem__(self, k: Never) -> None: ...
30-
if sys.version_info >= (3, 9):
31-
@overload
32-
def __or__(self, value: Self, /) -> Self: ...
33-
@overload
34-
def __or__(self, value: dict[str, Any], /) -> dict[str, object]: ...
35-
@overload
36-
def __ror__(self, value: Self, /) -> Self: ...
37-
@overload
38-
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ...
39-
# supposedly incompatible definitions of `__or__` and `__ior__`:
40-
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
29+
@overload
30+
def __or__(self, value: Self, /) -> Self: ...
31+
@overload
32+
def __or__(self, value: dict[str, Any], /) -> dict[str, object]: ...
33+
@overload
34+
def __ror__(self, value: Self, /) -> Self: ...
35+
@overload
36+
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ...
37+
# supposedly incompatible definitions of `__or__` and `__ior__`:
38+
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
4139

4240
def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ...
4341
@overload

stubs/regex/regex/regex.pyi

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
import sys
21
from _typeshed import ReadableBuffer, Unused
32
from collections.abc import Callable, Mapping
3+
from types import GenericAlias
44
from typing import Any, AnyStr, Generic, Literal, TypeVar, final, overload
55
from typing_extensions import Self
66

77
from . import _regex
88
from ._regex_core import *
99

10-
if sys.version_info >= (3, 9):
11-
from types import GenericAlias
12-
1310
_T = TypeVar("_T")
1411

1512
__version__: str
@@ -569,8 +566,7 @@ class Pattern(Generic[AnyStr]):
569566
) -> _regex.Scanner[bytes]: ...
570567
def __copy__(self) -> Self: ...
571568
def __deepcopy__(self, memo: Unused, /) -> Self: ...
572-
if sys.version_info >= (3, 9):
573-
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
569+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
574570

575571
@final
576572
class Match(Generic[AnyStr]):
@@ -648,5 +644,4 @@ class Match(Generic[AnyStr]):
648644
def __getitem__(self, key: int | str, /) -> AnyStr | Any: ...
649645
def __copy__(self) -> Self: ...
650646
def __deepcopy__(self, memo: Unused, /) -> Self: ...
651-
if sys.version_info >= (3, 9):
652-
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
647+
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...

stubs/six/six/moves/_dummy_thread.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import sys
2-
3-
if sys.version_info >= (3, 9):
4-
from _thread import *
5-
else:
6-
from _dummy_thread import *
1+
from _thread import *

0 commit comments

Comments
 (0)