Skip to content

Commit d15fed8

Browse files
committed
Drop Python 3.9 support
1 parent 347b940 commit d15fed8

17 files changed

+3
-46
lines changed

array_api_strict/_array_object.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import operator
1919
from collections.abc import Iterator
2020
from enum import IntEnum
21-
from types import ModuleType
21+
from types import EllipsisType, ModuleType
2222
from typing import Any, Literal, SupportsIndex
2323

2424
import numpy as np
@@ -42,10 +42,6 @@
4242
from ._flags import get_array_api_strict_flags, set_array_api_strict_flags
4343
from ._typing import PyCapsule
4444

45-
try:
46-
from types import EllipsisType # Python >=3.10
47-
except ImportError:
48-
EllipsisType = type(Ellipsis)
4945

5046

5147
class Device:

array_api_strict/_data_type_functions.py

-2
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

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import warnings
42
from typing import Any
53

array_api_strict/_elementwise_functions.py

-2
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

-2
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

+2-10
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
19+
from typing import TYPE_CHECKING, Any, Collection, ParamSpec, TypeVar
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

3426

array_api_strict/_helpers.py

-2
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

-2
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

-2
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

-2
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

array_api_strict/_linear_algebra_functions.py

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
linalg extension is disabled in the flags.
55
66
"""
7-
8-
from __future__ import annotations
9-
107
from collections.abc import Sequence
118

129
import numpy as np

array_api_strict/_manipulation_functions.py

-2
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/_searching_functions.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Literal
42

53
import numpy as np

array_api_strict/_set_functions.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import NamedTuple
42

53
import numpy as np

array_api_strict/_sorting_functions.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Literal
42

53
import numpy as np

array_api_strict/_statistical_functions.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Any
42

53
import numpy as np

array_api_strict/_utility_functions.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Any
42

53
import numpy as np

0 commit comments

Comments
 (0)