Skip to content

Commit eae3197

Browse files
committed
Add warning notices to Nexus APIs
1 parent 57eee56 commit eae3197

File tree

6 files changed

+32
-3
lines changed

6 files changed

+32
-3
lines changed

temporalio/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7272,7 +7272,7 @@ class NexusCallback:
72727272
"""Nexus callback to attach to events such as workflow completion.
72737273
72747274
.. warning::
7275-
This option is experimental and unstable.
7275+
This API is experimental and unstable.
72767276
"""
72777277

72787278
url: str

temporalio/nexus/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Temporal Nexus support
22
3+
.. warning::
4+
Nexus APIs are experimental and unstable.
5+
36
See https://github.com/temporalio/sdk-python/tree/main#nexus
47
"""
58

temporalio/nexus/_operation_context.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
class Info:
5656
"""Information about the running Nexus operation.
5757
58+
.. warning::
59+
This API is experimental and unstable.
60+
5861
Retrieved inside a Nexus operation handler via :py:func:`info`.
5962
"""
6063

@@ -175,7 +178,11 @@ def _add_outbound_links(
175178

176179

177180
class WorkflowRunOperationContext(StartOperationContext):
178-
"""Context received by a workflow run operation."""
181+
"""Context received by a workflow run operation.
182+
183+
.. warning::
184+
This API is experimental and unstable.
185+
"""
179186

180187
def __init__(self, *args, **kwargs):
181188
"""Initialize the workflow run operation context."""

temporalio/nexus/_token.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
class WorkflowHandle(Generic[OutputT]):
1818
"""A handle to a workflow that is backing a Nexus operation.
1919
20+
.. warning::
21+
This API is experimental and unstable.
22+
2023
Do not instantiate this directly. Use
2124
:py:func:`temporalio.nexus.WorkflowRunOperationContext.start_workflow` to create a
2225
handle.

temporalio/worker/_worker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ def __init__(
164164
may be async functions or non-async functions.
165165
nexus_service_handlers: Instances of Nexus service handler classes
166166
decorated with :py:func:`@nexusrpc.handler.service_handler`.
167+
168+
.. warning::
169+
This parameter is experimental and unstable.
167170
workflows: Workflow classes decorated with
168171
:py:func:`@workflow.defn<temporalio.workflow.defn>`.
169172
activity_executor: Concurrent executor to use for non-async
@@ -187,6 +190,9 @@ def __init__(
187190
Nexus operations. This is required if any operation start methods
188191
are non-`async def`. :py:class:`concurrent.futures.ThreadPoolExecutor`
189192
is recommended.
193+
194+
.. warning::
195+
This parameter is experimental and unstable.
190196
workflow_runner: Runner for workflows.
191197
unsandboxed_workflow_runner: Runner for workflows that opt-out of
192198
sandboxing.

temporalio/workflow.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4386,7 +4386,11 @@ async def execute_child_workflow(
43864386

43874387

43884388
class NexusOperationHandle(Generic[OutputT]):
4389-
"""Handle for interacting with a Nexus operation."""
4389+
"""Handle for interacting with a Nexus operation.
4390+
4391+
.. warning::
4392+
This API is experimental and unstable.
4393+
"""
43904394

43914395
def cancel(self) -> bool:
43924396
"""Request cancellation of the operation."""
@@ -5116,6 +5120,9 @@ def _to_proto(self) -> temporalio.bridge.proto.common.VersioningIntent.ValueType
51165120
class NexusClient(ABC, Generic[ServiceT]):
51175121
"""A client for invoking Nexus operations.
51185122
5123+
.. warning::
5124+
This API is experimental and unstable.
5125+
51195126
Example::
51205127
51215128
nexus_client = workflow.create_nexus_client(
@@ -5420,6 +5427,9 @@ def create_nexus_client(
54205427
) -> NexusClient[ServiceT]:
54215428
"""Create a Nexus client.
54225429
5430+
.. warning::
5431+
This API is experimental and unstable.
5432+
54235433
Args:
54245434
service: The Nexus service.
54255435
endpoint: The Nexus endpoint.

0 commit comments

Comments
 (0)