durable-workflow 0.4.99__tar.gz → 0.4.102__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 (73) hide show
  1. {durable_workflow-0.4.99/src/durable_workflow.egg-info → durable_workflow-0.4.102}/PKG-INFO +1 -1
  2. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/pyproject.toml +1 -1
  3. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/__init__.py +33 -21
  4. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/client.py +4 -2
  5. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/history_bundle_verify.py +4 -2
  6. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/python_conformance.py +5 -3
  7. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/replay_verify.py +3 -3
  8. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/sync.py +145 -89
  9. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/worker.py +3 -11
  10. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/workflow.py +14 -11
  11. {durable_workflow-0.4.99 → durable_workflow-0.4.102/src/durable_workflow.egg-info}/PKG-INFO +1 -1
  12. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow.egg-info/SOURCES.txt +2 -0
  13. durable_workflow-0.4.102/tests/test_ci_checkout.py +72 -0
  14. durable_workflow-0.4.102/tests/test_ci_integration_endpoint.py +141 -0
  15. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_client.py +6 -1
  16. durable_workflow-0.4.102/tests/test_release_docs_audit_workflow.py +161 -0
  17. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_replay_conformance.py +2 -0
  18. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_replay_verify.py +3 -1
  19. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_sync.py +82 -8
  20. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_worker.py +1 -1
  21. durable_workflow-0.4.99/tests/test_release_docs_audit_workflow.py +0 -59
  22. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/LICENSE +0 -0
  23. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/README.md +0 -0
  24. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/setup.cfg +0 -0
  25. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/_avro.py +0 -0
  26. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/activity.py +0 -0
  27. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/auth_composition.py +0 -0
  28. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/errors.py +0 -0
  29. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/external_storage.py +0 -0
  30. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/external_task_input.py +0 -0
  31. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/external_task_result.py +0 -0
  32. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/interceptors.py +0 -0
  33. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/invocable.py +0 -0
  34. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/metrics.py +0 -0
  35. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/nexus.py +0 -0
  36. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/py.typed +0 -0
  37. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/replay_conformance.py +0 -0
  38. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/retry_policy.py +0 -0
  39. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/serializer.py +0 -0
  40. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/testing.py +0 -0
  41. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow/workflow_updates_conformance.py +0 -0
  42. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
  43. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow.egg-info/entry_points.txt +0 -0
  44. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow.egg-info/requires.txt +0 -0
  45. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/src/durable_workflow.egg-info/top_level.txt +0 -0
  46. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_activity_context.py +0 -0
  47. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_auth_composition.py +0 -0
  48. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_control_plane_parity_fixtures.py +0 -0
  49. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_errors.py +0 -0
  50. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_external_storage.py +0 -0
  51. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_external_task_input.py +0 -0
  52. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_external_task_result.py +0 -0
  53. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_golden_history_replay.py +0 -0
  54. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_history_bundle_verify.py +0 -0
  55. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_history_event_contract.py +0 -0
  56. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_invocable.py +0 -0
  57. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_metrics.py +0 -0
  58. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_order_processing_example.py +0 -0
  59. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_public_boundary_scanner.py +0 -0
  60. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_python_conformance.py +0 -0
  61. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_queries.py +0 -0
  62. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_readme_quickstart.py +0 -0
  63. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_replay.py +0 -0
  64. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_retry_policy.py +0 -0
  65. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_schedules.py +0 -0
  66. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_serializer.py +0 -0
  67. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_signals.py +0 -0
  68. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_sleep.py +0 -0
  69. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_standalone_activity_client.py +0 -0
  70. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_testing_harness.py +0 -0
  71. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_updates.py +0 -0
  72. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_wait_condition.py +0 -0
  73. {durable_workflow-0.4.99 → durable_workflow-0.4.102}/tests/test_workflow_updates_conformance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: durable-workflow
3
- Version: 0.4.99
3
+ Version: 0.4.102
4
4
  Summary: Python SDK for the Durable Workflow server (language-neutral HTTP protocol)
5
5
  Author: Durable Workflow Contributors
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "durable-workflow"
7
- version = "0.4.99"
7
+ version = "0.4.102"
8
8
  description = "Python SDK for the Durable Workflow server (language-neutral HTTP protocol)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -78,12 +78,6 @@ from .errors import (
78
78
  WorkflowPayloadDecodeError,
79
79
  WorkflowTerminated,
80
80
  )
81
- from .nexus import (
82
- NEXUS_CALLER_SDK_LANGUAGE,
83
- NEXUS_OPERATION_RESULT_SCHEMA,
84
- NEXUS_OPERATION_RESULT_VERSION,
85
- NexusOperationResult,
86
- )
87
81
  from .external_storage import (
88
82
  EXTERNAL_PAYLOAD_REFERENCE_SCHEMA,
89
83
  AzureBlobExternalStorage,
@@ -125,6 +119,24 @@ from .external_task_result import (
125
119
  parse_external_task_result,
126
120
  parse_external_task_result_artifact,
127
121
  )
122
+ from .history_bundle_verify import (
123
+ BUNDLE_SCHEMA as HISTORY_BUNDLE_SCHEMA,
124
+ )
125
+ from .history_bundle_verify import (
126
+ BUNDLE_SCHEMA_VERSION as HISTORY_BUNDLE_SCHEMA_VERSION,
127
+ )
128
+ from .history_bundle_verify import (
129
+ REPORT_SCHEMA as HISTORY_BUNDLE_VERIFICATION_REPORT_SCHEMA,
130
+ )
131
+ from .history_bundle_verify import (
132
+ REPORT_SCHEMA_VERSION as HISTORY_BUNDLE_VERIFICATION_REPORT_SCHEMA_VERSION,
133
+ )
134
+ from .history_bundle_verify import (
135
+ verify_bundle as verify_history_bundle,
136
+ )
137
+ from .history_bundle_verify import (
138
+ verify_bundle_json as verify_history_bundle_json,
139
+ )
128
140
  from .interceptors import (
129
141
  ActivityHandler,
130
142
  ActivityInterceptorContext,
@@ -149,17 +161,16 @@ from .metrics import (
149
161
  NoopMetrics,
150
162
  PrometheusMetrics,
151
163
  )
152
- from .retry_policy import RetryPolicy, TransportRetryPolicy
153
- from .serializer import (
154
- PayloadSizeWarningConfig,
155
- PayloadSizeWarningContext,
156
- external_storage_envelope,
157
- to_avro_payload_value,
158
- to_avro_payload_values,
164
+ from .nexus import (
165
+ NEXUS_CALLER_SDK_LANGUAGE,
166
+ NEXUS_OPERATION_RESULT_SCHEMA,
167
+ NEXUS_OPERATION_RESULT_VERSION,
168
+ NexusOperationResult,
159
169
  )
160
- from .worker import Worker
161
170
  from .replay_verify import (
162
171
  CaseReport as ReplayCaseReport,
172
+ )
173
+ from .replay_verify import (
163
174
  GoldenHistoryReport,
164
175
  SimulationReport,
165
176
  aggregate_verdicts,
@@ -169,14 +180,15 @@ from .replay_verify import (
169
180
  verify_golden_history,
170
181
  verify_replay,
171
182
  )
172
- from .history_bundle_verify import (
173
- BUNDLE_SCHEMA as HISTORY_BUNDLE_SCHEMA,
174
- BUNDLE_SCHEMA_VERSION as HISTORY_BUNDLE_SCHEMA_VERSION,
175
- REPORT_SCHEMA as HISTORY_BUNDLE_VERIFICATION_REPORT_SCHEMA,
176
- REPORT_SCHEMA_VERSION as HISTORY_BUNDLE_VERIFICATION_REPORT_SCHEMA_VERSION,
177
- verify_bundle as verify_history_bundle,
178
- verify_bundle_json as verify_history_bundle_json,
183
+ from .retry_policy import RetryPolicy, TransportRetryPolicy
184
+ from .serializer import (
185
+ PayloadSizeWarningConfig,
186
+ PayloadSizeWarningContext,
187
+ external_storage_envelope,
188
+ to_avro_payload_value,
189
+ to_avro_payload_values,
179
190
  )
191
+ from .worker import Worker
180
192
  from .workflow import (
181
193
  ActivityRetryPolicy,
182
194
  ChildWorkflowRetryPolicy,
@@ -77,10 +77,12 @@ def _worker_poll_timeout_seconds(timeout: float | None) -> int | None:
77
77
 
78
78
 
79
79
  def _worker_poll_http_timeout(timeout: float | None) -> float | None:
80
- timeout_seconds = _worker_poll_timeout_seconds(timeout)
81
- if timeout_seconds is None:
80
+ if timeout is None:
82
81
  return None
83
82
 
83
+ timeout_seconds = _worker_poll_timeout_seconds(timeout)
84
+ assert timeout_seconds is not None
85
+
84
86
  if timeout_seconds == 0:
85
87
  return max(float(timeout), 1.0)
86
88
 
@@ -141,7 +141,8 @@ def _check_envelope(bundle: Mapping[str, Any], findings: list[dict[str, Any]]) -
141
141
  _finding(
142
142
  "bundle.schema_version_unsupported",
143
143
  SEVERITY_ERROR,
144
- f"Bundle schema_version [{bundle['schema_version']!s}] is unsupported; expected {BUNDLE_SCHEMA_VERSION}.",
144
+ f"Bundle schema_version [{bundle['schema_version']!s}] is unsupported; "
145
+ f"expected {BUNDLE_SCHEMA_VERSION}.",
145
146
  {"observed": bundle["schema_version"]},
146
147
  )
147
148
  )
@@ -325,7 +326,8 @@ def _check_commands(bundle: Mapping[str, Any], findings: list[dict[str, Any]]) -
325
326
  if not isinstance(commands, list):
326
327
  return
327
328
 
328
- events = bundle.get("history_events") if isinstance(bundle.get("history_events"), list) else []
329
+ raw_events = bundle.get("history_events")
330
+ events: list[Any] = raw_events if isinstance(raw_events, list) else []
329
331
  event_command_ids: set[str] = set()
330
332
  for event in events:
331
333
  if isinstance(event, Mapping):
@@ -16,7 +16,9 @@ import re
16
16
  import sys
17
17
  from collections.abc import Iterable, Mapping
18
18
  from pathlib import Path
19
- from typing import Any
19
+ from typing import Any, TypeVar
20
+
21
+ _T = TypeVar("_T")
20
22
 
21
23
  SCHEMA = "durable-workflow.v2.python-sdk-parity.contract"
22
24
  VERSION = 1
@@ -761,7 +763,7 @@ def _trace_plane_entries(value: Any, plane: str) -> list[Any]:
761
763
  return _filtered_traces(_trace_entries(value), plane)
762
764
 
763
765
 
764
- def _filtered_traces(traces: Any, plane: str) -> Any:
766
+ def _filtered_traces(traces: Any, plane: str) -> list[Any]:
765
767
  if not isinstance(traces, list):
766
768
  return []
767
769
  return [
@@ -820,7 +822,7 @@ def _copy_mapping(value: Any) -> dict[str, Any]:
820
822
  return dict(value) if isinstance(value, Mapping) else {}
821
823
 
822
824
 
823
- def _deepcopy_json_like(value: Any) -> Any:
825
+ def _deepcopy_json_like(value: _T) -> _T:
824
826
  return copy.deepcopy(value)
825
827
 
826
828
 
@@ -29,16 +29,16 @@ import argparse
29
29
  import json
30
30
  import sys
31
31
  import traceback
32
- from collections.abc import Iterable, Mapping, Sequence
32
+ from collections.abc import Callable, Iterable, Mapping, Sequence
33
33
  from dataclasses import dataclass, field
34
34
  from pathlib import Path
35
- from typing import Any, Callable
35
+ from typing import Any
36
36
 
37
37
  from .errors import ChildWorkflowFailed, NonDeterministicReplayError, WorkflowFailed
38
38
  from .workflow import (
39
39
  CompleteWorkflow,
40
- ReplayOutcome,
41
40
  Replayer,
41
+ ReplayOutcome,
42
42
  ScheduleActivity,
43
43
  StartChildWorkflow,
44
44
  )