Skip to content

Commit 4bb1630

Browse files
committed
remove dependency on basedtyping which is no longer maintained and crashes on python 3.14
1 parent c77d11b commit 4bb1630

File tree

8 files changed

+14
-25
lines changed

8 files changed

+14
-25
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ license = { text = "MIT" }
1111
dependencies = [
1212
"pytest>=7,<9",
1313
"robotframework>=6.1,<8.0.0",
14-
"basedtyping>=0.1.0,<0.2",
1514
"ansi2html>=1.9.1",
1615
]
1716
[dependency-groups]

pytest_robotframework/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from types import TracebackType
1212
from typing import TYPE_CHECKING, Callable, TypeVar, Union, cast, final, overload
1313

14-
from basedtyping import Function, P, T
1514
from pytest import StashKey
1615
from robot import result, running
1716
from robot.api import deco, logger
@@ -38,10 +37,13 @@
3837
is_robot_traceback,
3938
robot_6,
4039
)
40+
from pytest_robotframework._internal.utils import Function
4141

4242
if TYPE_CHECKING:
4343
from collections.abc import Iterable, Iterator, Mapping
4444

45+
from pytest_robotframework._internal.utils import P, T
46+
4547

4648
RobotVariables: TypeAlias = dict[str, object]
4749
"""variable names and values to be set on the suite level. see the `set_variables` function"""

pytest_robotframework/_internal/pytest/robot_file_support.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
robot_6,
2323
running_test_case_key,
2424
)
25-
from pytest_robotframework._internal.utils import patch_method
25+
from pytest_robotframework._internal.utils import P, patch_method
2626

2727
if TYPE_CHECKING:
2828
from collections.abc import Iterable, Iterator
@@ -32,7 +32,6 @@
3232
# compatibility with older versions
3333
from _pytest._code.code import TracebackStyle
3434
from _pytest._io import TerminalWriter
35-
from basedtyping import P
3635
from robot import model
3736
from robot.running.model import Body
3837

pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@
5656
robot_6,
5757
running_test_case_key,
5858
)
59-
from pytest_robotframework._internal.utils import patch_method
59+
from pytest_robotframework._internal.utils import Function, P, T, patch_method
6060

6161
if TYPE_CHECKING:
6262
from pathlib import Path
6363
from types import ModuleType
6464

6565
from _pytest.nodes import Node
66-
from basedtyping import Function, P, T
6766
from robot.running.builder.settings import TestDefaults
6867
from robot.running.context import _ExecutionContext # pyright:ignore[reportPrivateUsage]
6968

pytest_robotframework/_internal/robot/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
final,
1616
)
1717

18-
from basedtyping import T
1918
from pytest import Item, Session, StashKey
2019
from robot import model, running
2120
from robot.api.interfaces import ListenerV2, ListenerV3, Parser
@@ -24,7 +23,7 @@
2423
from robot.version import VERSION
2524
from typing_extensions import override
2625

27-
from pytest_robotframework._internal.utils import main_package_name
26+
from pytest_robotframework._internal.utils import T, main_package_name
2827

2928
if TYPE_CHECKING:
3029
from types import TracebackType

pytest_robotframework/_internal/utils.py

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

33
from functools import wraps
4-
from typing import TYPE_CHECKING, Callable, cast
4+
from typing import TYPE_CHECKING, Callable, TypeVar, cast
55

6-
from basedtyping import P, T
6+
from typing_extensions import ParamSpec, TypeAlias
77

88
if TYPE_CHECKING:
99
from typing_extensions import Concatenate
1010

11+
T = TypeVar("T")
12+
P = ParamSpec("P")
13+
14+
Function: TypeAlias = Callable[..., object]
15+
1116

1217
def patch_method(
1318
cls: type[object], method_name: str | None = None

tests/fixtures/test_robot/test_keyword_decorator_and_other_decorator/foo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pytest_robotframework import keyword
99

1010
if TYPE_CHECKING:
11-
from basedtyping import P, T
11+
from pytest_robotframework._internal.utils import P, T
1212

1313

1414
def decorator(fn: Callable[P, T]) -> Callable[P, T]:

uv.lock

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

0 commit comments

Comments
 (0)