Skip to content

Commit 386980a

Browse files
authored
chore: upgrade all dependencies to latest versions (#608)
1 parent f76a160 commit 386980a

File tree

6 files changed

+1827
-647
lines changed

6 files changed

+1827
-647
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
exclude: docs/auto_examples
1010
- repo: https://github.com/charliermarsh/ruff-pre-commit
1111
# Ruff version.
12-
rev: v0.15.0
12+
rev: v0.15.8
1313
hooks:
1414
# Run the linter.
1515
- id: ruff

pyproject.toml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,38 @@ requires-python = ">=3.9"
2828
homepage = "https://github.com/fgmacedo/python-statemachine"
2929

3030
[project.optional-dependencies]
31-
diagrams = ["pydot >= 2.0.0"]
31+
diagrams = ["pydot >= 4.0.1"]
3232

3333
[dependency-groups]
3434
dev = [
35-
"ruff >=0.15.0",
35+
"ruff >=0.15.8",
3636
"pre-commit",
3737
"mypy",
3838
"pytest",
39-
"pytest-cov >=6.0.0; python_version >='3.9'",
39+
"pytest-cov >=7.1.0; python_version >='3.9'",
4040
"pytest-cov; python_version <'3.9'",
41-
"pytest-sugar >=1.0.0",
42-
"pytest-mock >=3.14.0",
43-
"pytest-benchmark >=4.0.0",
44-
"pytest-asyncio >=0.25.0",
41+
"pytest-sugar >=1.1.1",
42+
"pytest-mock >=3.15.1",
43+
"pytest-benchmark >=5.2.3",
44+
"pytest-asyncio >=1.3.0; python_version >='3.10'",
45+
"pytest-asyncio >=0.25.0; python_version <'3.10'",
4546
"pydot",
46-
"django >=5.2.11; python_version >='3.10'",
47-
"pytest-django >=4.8.0; python_version >'3.8'",
47+
"django >=6.0.3; python_version >='3.12'",
48+
"django >=5.2.12; python_version >='3.10' and python_version <'3.12'",
49+
"pytest-django >=4.12.0; python_version >='3.10'",
4850
"Sphinx; python_version >'3.8'",
4951
"sphinx-gallery; python_version >'3.8'",
5052
"myst-parser; python_version >'3.8'",
5153
"pillow; python_version >'3.8'",
5254
"sphinx-autobuild; python_version >'3.8'",
53-
"furo >=2024.5.6; python_version >'3.8'",
55+
"furo >=2025.12.19; python_version >'3.8'",
5456
"sphinx-copybutton >=0.5.2; python_version >'3.8'",
5557
"sphinxcontrib-mermaid; python_version >'3.8'",
56-
"pdbr>=0.8.9; python_version >'3.8'",
57-
"babel >=2.16.0; python_version >='3.8'",
58-
"pytest-xdist>=3.6.1",
59-
"pytest-timeout>=2.3.1",
60-
"pyright>=1.1.400",
58+
"pdbr>=0.9.7; python_version >'3.8'",
59+
"babel >=2.18.0; python_version >='3.8'",
60+
"pytest-xdist>=3.8.0",
61+
"pytest-timeout>=2.4.0",
62+
"pyright>=1.1.408",
6163
]
6264

6365
[build-system]

statemachine/contrib/diagram/renderers/dot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from dataclasses import dataclass
22
from dataclasses import field
3+
from typing import Any
34
from typing import Dict
45
from typing import List
56
from typing import Optional
@@ -210,7 +211,7 @@ def _render_initial_arrow(
210211
initial_node = self._create_initial_node(initial_node_id)
211212
added_to_atomic = False
212213

213-
extra = {}
214+
extra: Dict[str, Any] = {}
214215
if initial_state.children:
215216
extra["lhead"] = f"cluster_{initial_state.id}"
216217

@@ -483,9 +484,9 @@ def _resolve_edge_endpoints(
483484
self,
484485
transition: DiagramTransition,
485486
target_id: Optional[str],
486-
) -> "tuple[str, str, Dict[str, str]]":
487+
) -> "tuple[str, str, Dict[str, Any]]":
487488
"""Resolve source/destination node IDs and cluster attributes for an edge."""
488-
extra: Dict[str, str] = {}
489+
extra: Dict[str, Any] = {}
489490
source_is_compound = transition.source in self._compound_ids
490491
target_is_compound = target_id is not None and target_id in self._compound_ids
491492

tests/test_contrib_diagram.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ class parent(State.Compound, name="Parent"):
384384
enter = start.to(parent)
385385

386386
dot = DotGraphMachine(SM)().to_string()
387-
assert "lhead=cluster_parent" in dot
387+
assert "lhead=" in dot
388+
assert "cluster_parent" in dot
388389

389390

390391
def test_initial_edge_inside_compound_subgraph():

tests/test_scxml_units.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,21 @@ def run(self, ctx):
10311031
assert wrapper._instance is handler_instance
10321032

10331033

1034+
class TestInvokeSessionSendToParentAsync:
1035+
async def test_send_to_parent_awaitable(self):
1036+
"""send_to_parent calls ensure_future when parent.send returns an awaitable."""
1037+
from statemachine.io.scxml.invoke import _InvokeSession
1038+
1039+
async def async_send(event, **kwargs):
1040+
pass
1041+
1042+
parent = Mock()
1043+
parent.send = async_send
1044+
session = _InvokeSession(parent, invokeid="inv1")
1045+
# Should not raise — the coroutine is scheduled via ensure_future
1046+
session.send_to_parent("child.done", key="value")
1047+
1048+
10341049
class TestOrderedSetStr:
10351050
def test_str_representation(self):
10361051
"""OrderedSet.__str__ returns a set-like string."""

0 commit comments

Comments
 (0)