Skip to content

Commit 7cf041b

Browse files
fix: drop Python 3.11 (#66)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5eb7351 commit 7cf041b

File tree

7 files changed

+67
-472
lines changed

7 files changed

+67
-472
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "MIT AND Apache-2.0"
1111
authors = [
1212
{ name = "34j", email = "34j.95a2p@simplelogin.com" },
1313
]
14-
requires-python = ">=3.9"
14+
requires-python = ">=3.12"
1515
classifiers = [
1616
"Development Status :: 2 - Pre-Alpha",
1717
"Intended Audience :: Developers",

src/array_api/_2022_12.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
Any,
1010
Literal,
1111
Protocol,
12+
Self,
1213
runtime_checkable,
1314
)
1415

1516
from typing_extensions import CapsuleType as PyCapsule
16-
from typing_extensions import Self
1717

1818
inf = float("inf")
1919

src/array_api/_2023_12.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
Any,
1010
Literal,
1111
Protocol,
12+
Self,
1213
TypedDict,
1314
runtime_checkable,
1415
)
1516

1617
from typing_extensions import CapsuleType as PyCapsule
17-
from typing_extensions import Self
1818

1919
inf = float("inf")
2020

src/array_api/_2024_12.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@
88
from typing import (
99
Any,
1010
Literal,
11-
Optional,
1211
Protocol,
12+
Self,
1313
TypedDict,
1414
runtime_checkable,
1515
)
1616

1717
from typing_extensions import CapsuleType as PyCapsule
18-
from typing_extensions import Self
1918

2019
inf = float("inf")
2120

22-
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank": Optional[int]})
21+
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank": int | None})
2322

2423

2524
class DataTypes(TypedDict, total=False):

src/array_api/_draft.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@
88
from typing import (
99
Any,
1010
Literal,
11-
Optional,
1211
Protocol,
12+
Self,
1313
TypedDict,
1414
runtime_checkable,
1515
)
1616

1717
from typing_extensions import CapsuleType as PyCapsule
18-
from typing_extensions import Self
1918

2019
inf = float("inf")
2120

22-
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank": Optional[int]})
21+
Capabilities = TypedDict("Capabilities", {"boolean indexing": bool, "data-dependent shapes": bool, "max rank": int | None})
2322

2423

2524
class DataTypes(TypedDict, total=False):

src/array_api/cli/_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def generate(body_module: dict[str, list[ast.stmt]], out_path: Path) -> None:
251251
# Create Protocols with __call__, representing functions
252252
for submodule, body in body_module.items():
253253
for i, b in enumerate(body):
254-
if isinstance(b, (ast.Import, ast.ImportFrom)):
254+
if isinstance(b, ast.Import | ast.ImportFrom):
255255
pass
256256
elif isinstance(b, ast.FunctionDef):
257257
# implemented in object rather than Namespace

uv.lock

Lines changed: 59 additions & 462 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)