dex-python-sdk 0.2.10__tar.gz → 0.2.11__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 (61) hide show
  1. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/PKG-INFO +3 -2
  2. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/README.md +2 -1
  3. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/__init__.py +4 -2
  4. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_invocation_context.py +7 -4
  5. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/channel.py +2 -2
  6. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/runtime_errors.py +8 -2
  7. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/pyproject.toml +1 -1
  8. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/LEGACY_NOTICES.md +0 -0
  9. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/LICENSE +0 -0
  10. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_async_value_hydrator.py +0 -0
  11. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_async_worker_dispatcher.py +0 -0
  12. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_async_worker_service.py +0 -0
  13. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_grpc_errors.py +0 -0
  14. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_native.pyi +0 -0
  15. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_utils.py +0 -0
  16. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_value_hydrator.py +0 -0
  17. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_value_mapper.py +0 -0
  18. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_worker_dispatcher.py +0 -0
  19. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/_worker_service.py +0 -0
  20. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/async_client.py +0 -0
  21. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/async_worker.py +0 -0
  22. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/attribute.py +0 -0
  23. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/blob_cache.py +0 -0
  24. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/client.py +0 -0
  25. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/client_options.py +0 -0
  26. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/codec.py +0 -0
  27. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/condition.py +0 -0
  28. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/context.py +0 -0
  29. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/dexpb/__init__.py +0 -0
  30. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/dexpb/dex_pb2.py +0 -0
  31. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/dexpb/dex_pb2.pyi +0 -0
  32. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/dexpb/dex_pb2_grpc.py +0 -0
  33. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/flow.py +0 -0
  34. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/flow_config.py +0 -0
  35. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/flow_info.py +0 -0
  36. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/flow_options.py +0 -0
  37. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/flow_result.py +0 -0
  38. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/py.typed +0 -0
  39. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/step.py +0 -0
  40. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/step_execution.py +0 -0
  41. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/stream.py +0 -0
  42. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/subflow.py +0 -0
  43. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/timer.py +0 -0
  44. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/wait.py +0 -0
  45. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/worker.py +0 -0
  46. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/dex/worker_options.py +0 -0
  47. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/Cargo.lock +0 -0
  48. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/Cargo.toml +0 -0
  49. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/Cargo.toml +0 -0
  50. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/LICENSE +0 -0
  51. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/config.rs +0 -0
  52. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/entry.rs +0 -0
  53. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/error.rs +0 -0
  54. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/format.rs +0 -0
  55. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/lib.rs +0 -0
  56. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/policy.rs +0 -0
  57. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/src/store.rs +0 -0
  58. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache/tests/blob_cache_integration.rs +0 -0
  59. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml +0 -0
  60. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache-python/LICENSE +0 -0
  61. {dex_python_sdk-0.2.10 → dex_python_sdk-0.2.11}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dex-python-sdk
3
- Version: 0.2.10
3
+ Version: 0.2.11
4
4
  Requires-Dist: grpcio>=1.83.0
5
5
  Requires-Dist: grpcio-status>=1.83.0
6
6
  Requires-Dist: protobuf>=7.35.1
@@ -49,7 +49,8 @@ def snapshot(self, context: dex.Context) -> dex.RPCResult[Snapshot]:
49
49
  Put an AttributeMap or ChannelMap directly in its plural load option when every
50
50
  current instance is needed. Use the singular instance options for the less common
51
51
  exact-instance case. A selected empty queue returns an empty tuple; reading an
52
- unselected map entry or pending-message snapshot raises **StateNotLoadedError**.
52
+ unselected map entry raises **AttributeMapNotLoadedError**. An unselected pending-message
53
+ snapshot raises **ChannelMessagesNotLoadedError**.
53
54
  Pending messages preserve FIFO order and include the server-assigned message ID.
54
55
  The snapshot does not change after the handler stages a publish or deletion.
55
56
 
@@ -33,7 +33,8 @@ def snapshot(self, context: dex.Context) -> dex.RPCResult[Snapshot]:
33
33
  Put an AttributeMap or ChannelMap directly in its plural load option when every
34
34
  current instance is needed. Use the singular instance options for the less common
35
35
  exact-instance case. A selected empty queue returns an empty tuple; reading an
36
- unselected map entry or pending-message snapshot raises **StateNotLoadedError**.
36
+ unselected map entry raises **AttributeMapNotLoadedError**. An unselected pending-message
37
+ snapshot raises **ChannelMessagesNotLoadedError**.
37
38
  Pending messages preserve FIFO order and include the server-assigned message ID.
38
39
  The snapshot does not change after the handler stages a publish or deletion.
39
40
 
@@ -62,6 +62,8 @@ from dex.flow_result import FlowResult, StepCompletion
62
62
  from dex.runtime_errors import (
63
63
  DexServiceError,
64
64
  ErrorSubStatus,
65
+ AttributeMapNotLoadedError,
66
+ ChannelMessagesNotLoadedError,
65
67
  FlowAlreadyStartedError,
66
68
  FlowDefinitionError,
67
69
  FlowErrorType,
@@ -71,7 +73,6 @@ from dex.runtime_errors import (
71
73
  LongPollTimeoutError,
72
74
  ChannelMessageNotFoundError,
73
75
  RpcLockConflictError,
74
- StateNotLoadedError,
75
76
  ValueMappingError,
76
77
  WorkerInvocationError,
77
78
  )
@@ -119,6 +120,7 @@ __all__ = [
119
120
  "AttributeLock",
120
121
  "AttributeMap",
121
122
  "AttributeMapLoad",
123
+ "AttributeMapNotLoadedError",
122
124
  "AsyncContext",
123
125
  "AsyncClient",
124
126
  "AsyncBufferedTextStream",
@@ -131,6 +133,7 @@ __all__ = [
131
133
  "ChannelMapLoad",
132
134
  "ChannelMessage",
133
135
  "ChannelMessageNotFoundError",
136
+ "ChannelMessagesNotLoadedError",
134
137
  "Client",
135
138
  "ClientOptions",
136
139
  "Codec",
@@ -160,7 +163,6 @@ __all__ = [
160
163
  "RPCResult",
161
164
  "RetryAfterError",
162
165
  "RpcLockConflictError",
163
- "StateNotLoadedError",
164
166
  "Registry",
165
167
  "TimeTravelOptions",
166
168
  "TimeTravelStepMethod",
@@ -20,7 +20,10 @@ from dex.codec import Codec
20
20
  from dex.dexpb import dex_pb2 as pb
21
21
  from dex.flow import Registry, _RegisteredFlow
22
22
  from dex.flow_result import FlowResult, flow_result_from_proto
23
- from dex.runtime_errors import StateNotLoadedError
23
+ from dex.runtime_errors import (
24
+ AttributeMapNotLoadedError,
25
+ ChannelMessagesNotLoadedError,
26
+ )
24
27
  from dex.step import (
25
28
  _NO_HEARTBEAT_VALUE,
26
29
  StepOutput,
@@ -445,7 +448,7 @@ class InvocationContext:
445
448
  channel_name = self._physical_name(definition, instance)
446
449
  is_loaded = definition.name in self._loaded_channel_names
447
450
  if not is_loaded:
448
- raise StateNotLoadedError(
451
+ raise ChannelMessagesNotLoadedError(
449
452
  f"Channel messages were not loaded for RPC: {definition.name}"
450
453
  )
451
454
  values = self._loaded_channel_messages.get(channel_name)
@@ -495,7 +498,7 @@ class InvocationContext:
495
498
  f"{definition.name}/" not in self._loaded_attribute_map_instances
496
499
  and physical_name not in self._loaded_attribute_map_instances
497
500
  ):
498
- raise StateNotLoadedError(
501
+ raise AttributeMapNotLoadedError(
499
502
  f"AttributeMap instance was not loaded for RPC: {physical_name}"
500
503
  )
501
504
 
@@ -507,7 +510,7 @@ class InvocationContext:
507
510
  self._method is InvocationMethod.RPC
508
511
  and f"{definition.name}/" not in self._loaded_attribute_map_instances
509
512
  ):
510
- raise StateNotLoadedError(
513
+ raise AttributeMapNotLoadedError(
511
514
  f"all AttributeMap instances were not loaded for RPC: {definition.name}"
512
515
  )
513
516
 
@@ -132,7 +132,7 @@ class Channel(Generic[ValueT]):
132
132
  Pending message IDs and decoded values in FIFO order.
133
133
 
134
134
  Raises:
135
- StateNotLoadedError: If the RPC did not load this Channel.
135
+ ChannelMessagesNotLoadedError: If the RPC did not load this Channel's messages.
136
136
  """
137
137
  return cast(
138
138
  Sequence[ChannelMessage[ValueT]],
@@ -355,7 +355,7 @@ class ChannelMap(Generic[ValueT]):
355
355
  Pending message IDs and decoded values in FIFO order.
356
356
 
357
357
  Raises:
358
- StateNotLoadedError: If the RPC did not load this ChannelMap.
358
+ ChannelMessagesNotLoadedError: If the RPC did not load this ChannelMap's messages.
359
359
  """
360
360
  return cast(
361
361
  Sequence[ChannelMessage[ValueT]],
@@ -175,8 +175,14 @@ class FlowDefinitionError(RuntimeError):
175
175
  pass
176
176
 
177
177
 
178
- class StateNotLoadedError(RuntimeError):
179
- """Indicate that an RPC read state omitted from its load configuration."""
178
+ class AttributeMapNotLoadedError(RuntimeError):
179
+ """Indicate that an RPC did not load the requested AttributeMap entries."""
180
+
181
+ pass
182
+
183
+
184
+ class ChannelMessagesNotLoadedError(RuntimeError):
185
+ """Indicate that an RPC did not load the requested pending Channel messages."""
180
186
 
181
187
  pass
182
188
 
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "dex-python-sdk"
3
3
  # Publish uses tag sdk-python/v*; CI stamps this for release builds.
4
- version = "0.2.10"
4
+ version = "0.2.11"
5
5
  description = "Python SDK for the Dex workflow engine"
6
6
  authors = [{name = "Super Durable"}]
7
7
  readme = "README.md"
File without changes