Skip to content

Commit e7c81bc

Browse files
committed
Drop Python 3.9 support
1 parent 34ce3f6 commit e7c81bc

18 files changed

+6
-54
lines changed

array_api_strict/_array_object.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
from __future__ import annotations
1717

1818
import operator
19-
import sys
2019
from collections.abc import Iterator
2120
from enum import IntEnum
22-
from types import ModuleType
23-
from typing import TYPE_CHECKING, Any, Final, Literal, SupportsIndex
21+
from types import EllipsisType, ModuleType
22+
from typing import Any, Final, Literal, SupportsIndex
2423

2524
import numpy as np
2625
import numpy.typing as npt
@@ -43,13 +42,6 @@
4342
from ._flags import get_array_api_strict_flags, set_array_api_strict_flags
4443
from ._typing import PyCapsule
4544

46-
if sys.version_info >= (3, 10):
47-
from types import EllipsisType
48-
elif TYPE_CHECKING:
49-
from typing_extensions import EllipsisType
50-
else:
51-
EllipsisType = type(Ellipsis)
52-
5345

5446
class Device:
5547
_device: Final[str]

array_api_strict/_data_type_functions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from dataclasses import dataclass
42

53
import numpy as np

array_api_strict/_dtypes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import builtins
42
import warnings
53
from typing import Any, Final

array_api_strict/_elementwise_functions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import numpy as np
42

53
from ._array_object import Array

array_api_strict/_fft.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from collections.abc import Sequence
42
from typing import Literal
53

array_api_strict/_flags.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,16 @@
1111
library will only support one particular configuration of these flags.
1212
1313
"""
14-
15-
from __future__ import annotations
16-
1714
import functools
1815
import os
1916
import warnings
2017
from collections.abc import Callable
2118
from types import TracebackType
22-
from typing import TYPE_CHECKING, Any, Collection, TypeVar, cast
19+
from typing import Any, Collection, ParamSpec, TypeVar, cast
2320

2421
import array_api_strict
2522

26-
if TYPE_CHECKING:
27-
# TODO import from typing (requires Python >= 3.10)
28-
from typing_extensions import ParamSpec
29-
30-
P = ParamSpec("P")
31-
23+
P = ParamSpec("P")
3224
T = TypeVar("T")
3325
_CallableT = TypeVar("_CallableT", bound=Callable[..., object])
3426

array_api_strict/_helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Private helper routines."""
22

3-
from __future__ import annotations
4-
53
from ._array_object import Array
64
from ._dtypes import _dtype_categories
75
from ._flags import get_array_api_strict_flags

array_api_strict/_indexing_functions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import numpy as np
42

53
from ._array_object import Array

array_api_strict/_info.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import numpy as np
42

53
from . import _dtypes as dt

array_api_strict/_linalg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from collections.abc import Sequence
42
from functools import partial
53
from typing import Literal, NamedTuple

0 commit comments

Comments
 (0)