Skip to content

Commit fb03ab6

Browse files
committed
bump python>=3.10 then run hatch fmt
1 parent 78c8f1a commit fb03ab6

File tree

18 files changed

+51
-36
lines changed

18 files changed

+51
-36
lines changed

pyproject.toml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,33 @@ requires = ["hatchling", "hatch-build-scripts"]
1010
name = "reactpy"
1111
description = "It's React, but in Python."
1212
readme = "README.md"
13-
keywords = ["react", "javascript", "reactpy", "component"]
13+
keywords = [
14+
"react",
15+
"reactjs",
16+
"reactpy",
17+
"components",
18+
"asgi",
19+
"wsgi",
20+
"website",
21+
"interactive",
22+
"reactive",
23+
"javascript",
24+
"server",
25+
]
1426
license = "MIT"
1527
authors = [
1628
{ name = "Mark Bakhit", email = "archiethemonger@gmail.com" },
1729
{ name = "Ryan Morshead", email = "ryan.morshead@gmail.com" },
1830
]
19-
requires-python = ">=3.9"
31+
requires-python = ">=3.10"
2032
classifiers = [
2133
"Development Status :: 5 - Production/Stable",
2234
"Programming Language :: Python",
2335
"Programming Language :: Python :: 3.10",
2436
"Programming Language :: Python :: 3.11",
2537
"Programming Language :: Python :: 3.12",
2638
"Programming Language :: Python :: 3.13",
39+
"Programming Language :: Python :: 3.14",
2740
"Programming Language :: Python :: Implementation :: CPython",
2841
"Programming Language :: Python :: Implementation :: PyPy",
2942
]
@@ -95,7 +108,7 @@ extra-dependencies = [
95108
features = ["all"]
96109

97110
[[tool.hatch.envs.hatch-test.matrix]]
98-
python = ["3.10", "3.11", "3.12", "3.13"]
111+
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
99112

100113
[tool.pytest.ini_options]
101114
addopts = ["--strict-config", "--strict-markers"]

src/reactpy/_console/rewrite_props.py

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

33
import ast
4+
from collections.abc import Callable
45
from copy import copy
56
from keyword import kwlist
67
from pathlib import Path
7-
from typing import Callable
88

99
import click
1010

@@ -102,7 +102,7 @@ def _rewrite_props(
102102
keys: list[ast.expr | None] = []
103103
values: list[ast.expr] = []
104104
# Iterate over the keys and values in the dictionary
105-
for k, v in zip(props_node.keys, props_node.values):
105+
for k, v in zip(props_node.keys, props_node.values, strict=False):
106106
if isinstance(k, ast.Constant) and isinstance(k.value, str):
107107
# Construct the new key and value
108108
k_value, new_v = constructor(k.value, v)

src/reactpy/_option.py

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

33
import os
4+
from collections.abc import Callable
45
from logging import getLogger
5-
from typing import Any, Callable, Generic, TypeVar, cast
6+
from typing import Any, Generic, TypeVar, cast
67

78
from reactpy._warnings import warn
89

src/reactpy/core/_life_cycle_hook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import logging
44
import sys
55
from asyncio import Event, Task, create_task, gather
6+
from collections.abc import Callable
67
from contextvars import ContextVar, Token
7-
from typing import Any, Callable, Protocol, TypeVar
8+
from typing import Any, Protocol, TypeVar
89

910
from anyio import Semaphore
1011

src/reactpy/core/_thread_local.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from collections.abc import Callable
12
from threading import Thread, current_thread
2-
from typing import Callable, Generic, TypeVar
3+
from typing import Generic, TypeVar
34
from weakref import WeakKeyDictionary
45

56
_StateType = TypeVar("_StateType")

src/reactpy/core/component.py

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

33
import inspect
4+
from collections.abc import Callable
45
from functools import wraps
5-
from typing import Any, Callable
6+
from typing import Any
67

78
from reactpy.types import ComponentType, VdomDict
89

src/reactpy/core/events.py

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

33
import asyncio
44
import dis
5-
from collections.abc import Sequence
6-
from typing import Any, Callable, Literal, cast, overload
5+
from collections.abc import Callable, Sequence
6+
from typing import Any, Literal, cast, overload
77

88
from anyio import create_task_group
99

src/reactpy/core/hooks.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,20 @@
22

33
import asyncio
44
import contextlib
5-
from collections.abc import Coroutine, Sequence
5+
from collections.abc import Callable, Coroutine, Sequence
66
from logging import getLogger
77
from types import FunctionType
88
from typing import (
99
TYPE_CHECKING,
1010
Any,
11-
Callable,
1211
Generic,
1312
Protocol,
13+
TypeAlias,
1414
TypeVar,
1515
cast,
1616
overload,
1717
)
1818

19-
from typing_extensions import TypeAlias
20-
2119
from reactpy.config import REACTPY_DEBUG
2220
from reactpy.core._life_cycle_hook import HOOK_STACK
2321
from reactpy.types import (
@@ -515,7 +513,7 @@ def use_memo(
515513
# if deps are same length check identity for each item
516514
or not all(
517515
strictly_equal(current, new)
518-
for current, new in zip(memo.deps, dependencies)
516+
for current, new in zip(memo.deps, dependencies, strict=False)
519517
)
520518
):
521519
memo.deps = dependencies

src/reactpy/core/layout.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,23 @@
1111
wait,
1212
)
1313
from collections import Counter
14-
from collections.abc import Sequence
14+
from collections.abc import Callable, Sequence
1515
from contextlib import AsyncExitStack
1616
from logging import getLogger
1717
from types import TracebackType
1818
from typing import (
1919
Any,
20-
Callable,
2120
Generic,
2221
NamedTuple,
2322
NewType,
23+
TypeAlias,
2424
TypeVar,
2525
cast,
2626
)
2727
from uuid import uuid4
2828
from weakref import ref as weakref
2929

3030
from anyio import Semaphore
31-
from typing_extensions import TypeAlias
3231

3332
from reactpy.config import (
3433
REACTPY_ASYNC_RENDERING,

src/reactpy/core/serve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3-
from collections.abc import Awaitable
3+
from collections.abc import Awaitable, Callable
44
from logging import getLogger
5-
from typing import Any, Callable
5+
from typing import Any
66

77
from anyio import create_task_group
88
from anyio.abc import TaskGroup

0 commit comments

Comments
 (0)