frequenz-dispatch 1.0.4__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {frequenz_dispatch-1.0.4/src/frequenz_dispatch.egg-info → frequenz_dispatch-1.1.0}/PKG-INFO +25 -24
  2. frequenz_dispatch-1.1.0/RELEASE_NOTES.md +22 -0
  3. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/pyproject.toml +25 -24
  4. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/__init__.py +12 -8
  5. frequenz_dispatch-1.1.0/src/frequenz/dispatch/_actor_dispatcher.py +978 -0
  6. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/_bg_service.py +69 -15
  7. frequenz_dispatch-1.1.0/src/frequenz/dispatch/_continuation.py +164 -0
  8. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/_dispatcher.py +49 -15
  9. frequenz_dispatch-1.1.0/src/frequenz/dispatch/_merge_helpers.py +33 -0
  10. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/_merge_strategies.py +10 -12
  11. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0/src/frequenz_dispatch.egg-info}/PKG-INFO +25 -24
  12. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz_dispatch.egg-info/SOURCES.txt +2 -0
  13. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz_dispatch.egg-info/requires.txt +24 -23
  14. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz_dispatch.egg-info/scm_file_list.json +5 -0
  15. frequenz_dispatch-1.1.0/src/frequenz_dispatch.egg-info/scm_version.json +8 -0
  16. frequenz_dispatch-1.0.4/RELEASE_NOTES.md +0 -10
  17. frequenz_dispatch-1.0.4/src/frequenz/dispatch/_actor_dispatcher.py +0 -359
  18. frequenz_dispatch-1.0.4/src/frequenz_dispatch.egg-info/scm_version.json +0 -8
  19. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/LICENSE +0 -0
  20. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/MANIFEST.in +0 -0
  21. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/README.md +0 -0
  22. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/setup.cfg +0 -0
  23. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/_dispatch.py +0 -0
  24. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/_event.py +0 -0
  25. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/conftest.py +0 -0
  26. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz/dispatch/py.typed +0 -0
  27. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz_dispatch.egg-info/dependency_links.txt +0 -0
  28. {frequenz_dispatch-1.0.4 → frequenz_dispatch-1.1.0}/src/frequenz_dispatch.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: frequenz-dispatch
3
- Version: 1.0.4
3
+ Version: 1.1.0
4
4
  Summary: A highlevel interface for the dispatch API
5
5
  Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
6
  License-Expression: MIT
@@ -19,54 +19,55 @@ Classifier: Typing :: Typed
19
19
  Requires-Python: <4,>=3.11
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
- Requires-Dist: typing-extensions<5.0.0,>=4.13.0
22
+ Requires-Dist: typing-extensions<5.0.0,>=4.16.0
23
23
  Requires-Dist: frequenz-sdk<1.0.0-rc2300,>=1.0.0-rc2100
24
- Requires-Dist: frequenz-channels<2.0.0,>=1.6.1
24
+ Requires-Dist: frequenz-channels<3.0.0,>=1.13.0
25
25
  Requires-Dist: frequenz-client-dispatch<2.0.0,>=0.11.3
26
26
  Requires-Dist: frequenz-client-base<0.12.0,>=0.11.0
27
- Requires-Dist: frequenz-client-common<0.4.0,>=0.3.8
28
- Requires-Dist: frequenz-core<2.0.0,>=1.0.2
27
+ Requires-Dist: frequenz-client-common<0.5.0,>=0.3.8
28
+ Requires-Dist: frequenz-core<2.0.0,>=1.6.0
29
29
  Requires-Dist: grpcio<2.0.0,>=1.80.0
30
30
  Provides-Extra: dev-flake8
31
- Requires-Dist: flake8==7.3.0; extra == "dev-flake8"
31
+ Requires-Dist: flake8==7.5.0; extra == "dev-flake8"
32
32
  Requires-Dist: flake8-datetimez==26.8.1; extra == "dev-flake8"
33
33
  Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
34
34
  Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
35
- Requires-Dist: pydoclint==0.9.1; extra == "dev-flake8"
35
+ Requires-Dist: pydoclint==0.12.0; extra == "dev-flake8"
36
36
  Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
37
37
  Provides-Extra: dev-formatting
38
- Requires-Dist: black==26.5.1; extra == "dev-formatting"
39
- Requires-Dist: isort==9.0.1; extra == "dev-formatting"
38
+ Requires-Dist: black==26.10.1; extra == "dev-formatting"
39
+ Requires-Dist: isort==9.0.2; extra == "dev-formatting"
40
40
  Provides-Extra: dev-mkdocs
41
- Requires-Dist: black==26.5.1; extra == "dev-mkdocs"
42
- Requires-Dist: Markdown==3.10.3; extra == "dev-mkdocs"
41
+ Requires-Dist: black==26.10.1; extra == "dev-mkdocs"
42
+ Requires-Dist: Markdown==3.11.3; extra == "dev-mkdocs"
43
43
  Requires-Dist: mike==2.2.0; extra == "dev-mkdocs"
44
44
  Requires-Dist: mkdocs-gen-files==0.6.1; extra == "dev-mkdocs"
45
45
  Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
46
46
  Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
47
- Requires-Dist: mkdocs-material==9.7.7; extra == "dev-mkdocs"
48
- Requires-Dist: mkdocstrings[python]==1.0.6; extra == "dev-mkdocs"
49
- Requires-Dist: mkdocstrings-python==2.0.8; extra == "dev-mkdocs"
47
+ Requires-Dist: mkdocs-material==9.8.1; extra == "dev-mkdocs"
48
+ Requires-Dist: mkdocstrings[python]==1.0.8; extra == "dev-mkdocs"
49
+ Requires-Dist: mkdocstrings-python==2.0.11; extra == "dev-mkdocs"
50
50
  Requires-Dist: frequenz-repo-config[lib]==0.19.0; extra == "dev-mkdocs"
51
51
  Provides-Extra: dev-mypy
52
- Requires-Dist: mypy==2.3.1; extra == "dev-mypy"
52
+ Requires-Dist: mypy==2.4.1; extra == "dev-mypy"
53
53
  Requires-Dist: grpc-stubs==1.53.0.6; extra == "dev-mypy"
54
- Requires-Dist: types-Markdown==3.10.2.20260712; extra == "dev-mypy"
54
+ Requires-Dist: types-Markdown==3.11.3.20261108; extra == "dev-mypy"
55
55
  Requires-Dist: frequenz-dispatch[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
56
56
  Provides-Extra: dev-noxfile
57
- Requires-Dist: uv==0.12.13; extra == "dev-noxfile"
58
- Requires-Dist: nox==2026.8.17; extra == "dev-noxfile"
57
+ Requires-Dist: uv==0.13.8; extra == "dev-noxfile"
58
+ Requires-Dist: nox==2026.10.20; extra == "dev-noxfile"
59
59
  Requires-Dist: frequenz-repo-config[lib]==0.19.0; extra == "dev-noxfile"
60
60
  Provides-Extra: dev-pylint
61
- Requires-Dist: pylint==4.0.8; extra == "dev-pylint"
61
+ Requires-Dist: pylint==4.1.3; extra == "dev-pylint"
62
62
  Requires-Dist: frequenz-dispatch[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
63
63
  Provides-Extra: dev-pytest
64
- Requires-Dist: pytest==9.1.1; extra == "dev-pytest"
64
+ Requires-Dist: pytest==9.2.0; extra == "dev-pytest"
65
+ Requires-Dist: pylint==4.1.3; extra == "dev-pytest"
65
66
  Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.19.0; extra == "dev-pytest"
66
- Requires-Dist: pytest-mock==3.15.1; extra == "dev-pytest"
67
- Requires-Dist: pytest-asyncio==1.4.0; extra == "dev-pytest"
68
- Requires-Dist: async-solipsism==0.9; extra == "dev-pytest"
69
- Requires-Dist: time-machine==3.5.1; extra == "dev-pytest"
67
+ Requires-Dist: pytest-mock==3.17.0; extra == "dev-pytest"
68
+ Requires-Dist: pytest-asyncio==1.5.0; extra == "dev-pytest"
69
+ Requires-Dist: async-solipsism==0.10; extra == "dev-pytest"
70
+ Requires-Dist: time-machine==3.6.0; extra == "dev-pytest"
70
71
  Provides-Extra: dev
71
72
  Requires-Dist: frequenz-dispatch[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
72
73
  Dynamic: license-file
@@ -0,0 +1,22 @@
1
+ # Dispatch Highlevel Interface Release Notes
2
+
3
+ ## Summary
4
+
5
+ This release adds opt-in support for handing over a running actor between exactly adjacent dispatches, and adds support for `frequenz-channels` v2.0.0, while still supporting v1.13. It also fixes actors being left running when a dispatch's merge identity changes, and a scheduler timer crash.
6
+
7
+ ## Upgrading
8
+
9
+ * `ActorDispatcher.ActorAndChannel` was exposed by mistake. This internal helper is now private and is no longer available under its old name.
10
+ * Dispatch now accepts `frequenz-channels >= 1.13.0, < 3`, including v2.
11
+ * The minimum `frequenz-core` version is now 1.6.0, and the minimum `typing-extensions` version is now 4.16.0. These versions are required by `frequenz-channels` 1.13.0 too.
12
+ * The internal timers now use `MonotonicTimer`, and channel shutdown uses `aclose`. These replace APIs that `frequenz-channels` v2 removes.
13
+
14
+ ## New Features
15
+
16
+ * Added opt-in support for reusing a continuation-capable actor across exactly adjacent, compatible dispatches, enabled only through `Dispatcher.start_managing(continuation_predicate=...)`. New public names: `ContinuationCapable`, `is_exact_continuation()`, `DispatchInfo.continuation_of` and `DispatchInfo.dispatch`. Ambiguous or unsupported handovers keep the normal stop/start behavior.
17
+
18
+ ## Bug Fixes
19
+
20
+ * Docstrings now use absolute cross-references to public paths instead of relative ones. Relative cross-references are expanded from the module where an object is defined since mkdocstrings-python 2.0.9, which broke some links, and projects rendering docstrings inherited from this library needed `relative_crossrefs: true` for them to work at all. See [frequenz-repo-config-python#655](https://github.com/frequenz-floss/frequenz-repo-config-python/issues/655) for details.
21
+ * Fixed actors being left running when an update changes a dispatch's merge identity.
22
+ * Fixed the scheduler's timer crashing when two scheduled events landed at the same instant, and stopped it from spinning at a microsecond interval once its event queue emptied afterward.
@@ -3,8 +3,8 @@
3
3
 
4
4
  [build-system]
5
5
  requires = [
6
- "setuptools == 84.0.0",
7
- "setuptools_scm[toml] == 10.2.1",
6
+ "setuptools == 84.2.1",
7
+ "setuptools_scm[toml] == 10.3.4",
8
8
  "frequenz-repo-config[lib] == 0.19.0",
9
9
  ]
10
10
  build-backend = "setuptools.build_meta"
@@ -34,16 +34,16 @@ classifiers = [
34
34
  ]
35
35
  requires-python = ">= 3.11, < 4"
36
36
  dependencies = [
37
- "typing-extensions >= 4.13.0, < 5.0.0",
37
+ "typing-extensions >= 4.16.0, < 5.0.0",
38
38
  # Make sure to update the version for cross-referencing also in the
39
39
  # mkdocs.yml file when changing the version here (look for the config key
40
40
  # plugins.mkdocstrings.handlers.python.inventories)
41
41
  "frequenz-sdk >= 1.0.0-rc2100, < 1.0.0-rc2300",
42
- "frequenz-channels >= 1.6.1, < 2.0.0",
42
+ "frequenz-channels >= 1.13.0, < 3.0.0",
43
43
  "frequenz-client-dispatch >= 0.11.3, < 2.0.0",
44
44
  "frequenz-client-base >= 0.11.0, < 0.12.0",
45
- "frequenz-client-common >= 0.3.8, < 0.4.0",
46
- "frequenz-core >= 1.0.2, < 2.0.0",
45
+ "frequenz-client-common >= 0.3.8, < 0.5.0",
46
+ "frequenz-core >= 1.6.0, < 2.0.0",
47
47
  "grpcio >= 1.80.0, < 2.0.0",
48
48
  ]
49
49
  dynamic = ["version"]
@@ -54,51 +54,52 @@ email = "floss@frequenz.com"
54
54
 
55
55
  [project.optional-dependencies]
56
56
  dev-flake8 = [
57
- "flake8 == 7.3.0",
57
+ "flake8 == 7.5.0",
58
58
  "flake8-datetimez == 26.8.1",
59
59
  "flake8-docstrings == 1.7.0",
60
60
  "flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
61
- "pydoclint == 0.9.1",
61
+ "pydoclint == 0.12.0",
62
62
  "pydocstyle == 6.3.0",
63
63
  ]
64
- dev-formatting = ["black == 26.5.1", "isort == 9.0.1"]
64
+ dev-formatting = ["black == 26.10.1", "isort == 9.0.2"]
65
65
  dev-mkdocs = [
66
- "black == 26.5.1",
67
- "Markdown==3.10.3",
66
+ "black == 26.10.1",
67
+ "Markdown==3.11.3",
68
68
  "mike == 2.2.0",
69
69
  "mkdocs-gen-files == 0.6.1",
70
70
  "mkdocs-literate-nav == 0.6.3",
71
71
  "mkdocs-macros-plugin == 1.5.0",
72
- "mkdocs-material == 9.7.7",
73
- "mkdocstrings[python] == 1.0.6",
74
- "mkdocstrings-python == 2.0.8",
72
+ "mkdocs-material == 9.8.1",
73
+ "mkdocstrings[python] == 1.0.8",
74
+ "mkdocstrings-python == 2.0.11",
75
75
  "frequenz-repo-config[lib] == 0.19.0",
76
76
  ]
77
77
  dev-mypy = [
78
- "mypy == 2.3.1",
78
+ "mypy == 2.4.1",
79
79
  # This dependency introduces breaking changes in patch releases
80
80
  "grpc-stubs == 1.53.0.6",
81
- "types-Markdown == 3.10.2.20260712",
81
+ "types-Markdown == 3.11.3.20261108",
82
82
  # For checking the noxfile, docs/ script, and tests
83
83
  "frequenz-dispatch[dev-mkdocs,dev-noxfile,dev-pytest]",
84
84
  ]
85
85
  dev-noxfile = [
86
- "uv == 0.12.13",
87
- "nox == 2026.8.17",
86
+ "uv == 0.13.8",
87
+ "nox == 2026.10.20",
88
88
  "frequenz-repo-config[lib] == 0.19.0",
89
89
  ]
90
90
  dev-pylint = [
91
- "pylint == 4.0.8",
91
+ "pylint == 4.1.3",
92
92
  # For checking the noxfile, docs/ script, and tests
93
93
  "frequenz-dispatch[dev-mkdocs,dev-noxfile,dev-pytest]",
94
94
  ]
95
95
  dev-pytest = [
96
- "pytest == 9.1.1",
96
+ "pytest == 9.2.0",
97
+ "pylint == 4.1.3", # We need this to check for the examples
97
98
  "frequenz-repo-config[extra-lint-examples] == 0.19.0",
98
- "pytest-mock == 3.15.1",
99
- "pytest-asyncio == 1.4.0",
100
- "async-solipsism == 0.9",
101
- "time-machine == 3.5.1",
99
+ "pytest-mock == 3.17.0",
100
+ "pytest-asyncio == 1.5.0",
101
+ "async-solipsism == 0.10",
102
+ "time-machine == 3.6.0",
102
103
  ]
103
104
  dev = [
104
105
  "frequenz-dispatch[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
@@ -5,18 +5,20 @@
5
5
 
6
6
  A small overview of the most important classes in this module:
7
7
 
8
- * [`Dispatcher`][.Dispatcher]: The entry point for the API.
9
- * [`Dispatch`][.Dispatch]: A dispatch type with lots of useful extra functionality.
10
- * [`ActorDispatcher`][.ActorDispatcher]: A service to manage other actors based on
11
- incoming dispatches.
12
- * [`Created`][.Created],
13
- [`Updated`][.Updated],
14
- [`Deleted`][.Deleted]: Dispatch event types.
8
+ * [`Dispatcher`][frequenz.dispatch.Dispatcher]: The entry point for the API.
9
+ * [`Dispatch`][frequenz.dispatch.Dispatch]: A dispatch type with lots of useful extra
10
+ functionality.
11
+ * [`ActorDispatcher`][frequenz.dispatch.ActorDispatcher]: A service to manage other
12
+ actors based on incoming dispatches.
13
+ * [`Created`][frequenz.dispatch.Created],
14
+ [`Updated`][frequenz.dispatch.Updated],
15
+ [`Deleted`][frequenz.dispatch.Deleted]: Dispatch event types.
15
16
 
16
17
  """
17
18
 
18
- from ._actor_dispatcher import ActorDispatcher, DispatchInfo
19
+ from ._actor_dispatcher import ActorDispatcher, ContinuationCapable, DispatchInfo
19
20
  from ._bg_service import MergeStrategy
21
+ from ._continuation import is_exact_continuation
20
22
  from ._dispatch import Dispatch
21
23
  from ._dispatcher import Dispatcher
22
24
  from ._event import Created, Deleted, DispatchEvent, Updated
@@ -30,8 +32,10 @@ __all__ = [
30
32
  "Updated",
31
33
  "Dispatch",
32
34
  "ActorDispatcher",
35
+ "ContinuationCapable",
33
36
  "DispatchInfo",
34
37
  "MergeStrategy",
35
38
  "MergeByType",
36
39
  "MergeByTypeTarget",
40
+ "is_exact_continuation",
37
41
  ]