From bf275c1819bbefa8a1891ba426526d72fef6f88e Mon Sep 17 00:00:00 2001 From: Joie Wu Date: Wed, 14 Oct 2026 11:11:44 -0700 Subject: [PATCH 1/2] Mark standalone Nexus operations as Public Preview Replace experimental API warnings with Public Preview notices and document our aim to preserve backward compatibility and avoid breaking changes. Update the README to describe direct client calls and add a stabilized changelog fragment. Refs NEXUS-269 --- README.md | 6 +- changelog/stabilized/nimble-nexus-narwhal.md | 1 + temporalio/client/_client.py | 20 +++-- temporalio/client/_interceptor.py | 70 +++++++++------- temporalio/client/_nexus.py | 85 ++++++++++++-------- temporalio/common.py | 25 +++--- temporalio/exceptions.py | 5 +- 7 files changed, 128 insertions(+), 84 deletions(-) create mode 100644 changelog/stabilized/nimble-nexus-narwhal.md diff --git a/README.md b/README.md index 81d4069695..ef90aa9146 100644 --- a/README.md +++ b/README.md @@ -1611,8 +1611,10 @@ code](https://github.com/temporalio/samples-python/blob/main/context_propagation [Nexus](https://github.com/nexus-rpc/) is a synchronous RPC protocol. Arbitrary duration operations that can respond asynchronously are modeled on top of a set of pre-defined synchronous RPCs. -Temporal supports calling Nexus operations **from a workflow**. See https://docs.temporal.io/nexus. There is no support -currently for calling a Nexus operation from non-workflow code. +Temporal supports calling Nexus operations **from a workflow** or directly from a client using +[Standalone Nexus Operations](https://docs.temporal.io/develop/python/nexus/standalone-operations). +Standalone Nexus Operations are in [Public Preview](https://docs.temporal.io/evaluate/development-production-features/release-stages#public-preview). +We aim to preserve backward compatibility and avoid breaking changes. See https://docs.temporal.io/nexus. To get started quickly using Nexus with Temporal, see the Python Nexus sample: https://github.com/temporalio/samples-python/tree/nexus/hello_nexus. diff --git a/changelog/stabilized/nimble-nexus-narwhal.md b/changelog/stabilized/nimble-nexus-narwhal.md new file mode 100644 index 0000000000..aa3d3938a0 --- /dev/null +++ b/changelog/stabilized/nimble-nexus-narwhal.md @@ -0,0 +1 @@ +Standalone Nexus Operations are in Public Preview. We aim to preserve backward compatibility and avoid breaking changes. diff --git a/temporalio/client/_client.py b/temporalio/client/_client.py index efef5cb528..640db46fce 100644 --- a/temporalio/client/_client.py +++ b/temporalio/client/_client.py @@ -2859,8 +2859,9 @@ def create_nexus_client( ) -> NexusClient[NexusServiceType]: """Create a client for starting standalone Nexus operations. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: service: The Nexus service type or service name string. @@ -2884,8 +2885,9 @@ def list_nexus_operations( ) -> NexusOperationExecutionAsyncIterator: """List standalone Nexus operations. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. This does not make a request until the first iteration is attempted. Therefore any errors will not occur until then. @@ -2927,8 +2929,9 @@ async def count_nexus_operations( ) -> NexusOperationExecutionCount: """Count standalone Nexus operations. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: query: A Temporal visibility filter for nexus operations. @@ -2981,8 +2984,9 @@ def get_nexus_operation_handle( ) -> NexusOperationHandle[Any]: """Get a handle to an existing standalone Nexus operation. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: operation_id: The operation ID. diff --git a/temporalio/client/_interceptor.py b/temporalio/client/_interceptor.py index 68077ebc93..f83142daf2 100644 --- a/temporalio/client/_interceptor.py +++ b/temporalio/client/_interceptor.py @@ -585,8 +585,9 @@ class GetWorkerTaskReachabilityInput: class StartNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.start_nexus_operation`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ operation: str @@ -611,8 +612,9 @@ class StartNexusOperationInput: class DescribeNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.describe_nexus_operation`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ operation_id: str @@ -625,8 +627,9 @@ class DescribeNexusOperationInput: class GetNexusOperationResultInput: """Input for :py:meth:`OutboundInterceptor.get_nexus_operation_result`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ operation_id: str @@ -643,8 +646,9 @@ class GetNexusOperationResultInput: class CancelNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.cancel_nexus_operation`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ operation_id: str @@ -658,8 +662,9 @@ class CancelNexusOperationInput: class TerminateNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.terminate_nexus_operation`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ operation_id: str @@ -673,8 +678,9 @@ class TerminateNexusOperationInput: class ListNexusOperationsInput: """Input for :py:meth:`OutboundInterceptor.list_nexus_operations`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ query: str | None @@ -689,8 +695,9 @@ class ListNexusOperationsInput: class CountNexusOperationsInput: """Input for :py:meth:`OutboundInterceptor.count_nexus_operations`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ query: str | None @@ -939,8 +946,9 @@ async def start_nexus_operation( ) -> NexusOperationHandle[Any]: """Called for every :py:meth:`NexusClient.start_operation` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ return await self.next.start_nexus_operation(input) @@ -949,8 +957,9 @@ async def describe_nexus_operation( ) -> NexusOperationExecutionDescription: """Called for every :py:meth:`NexusOperationHandle.describe` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ return await self.next.describe_nexus_operation(input) @@ -959,16 +968,18 @@ async def get_nexus_operation_result( ) -> Any: """Called for every :py:meth:`NexusOperationHandle.result` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ return await self.next.get_nexus_operation_result(input) async def cancel_nexus_operation(self, input: CancelNexusOperationInput) -> None: """Called for every :py:meth:`NexusOperationHandle.cancel` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ await self.next.cancel_nexus_operation(input) @@ -977,8 +988,9 @@ async def terminate_nexus_operation( ) -> None: """Called for every :py:meth:`NexusOperationHandle.terminate` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ await self.next.terminate_nexus_operation(input) @@ -987,8 +999,9 @@ def list_nexus_operations( ) -> NexusOperationExecutionAsyncIterator: """Called for every :py:meth:`Client.list_nexus_operations` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ return self.next.list_nexus_operations(input) @@ -997,7 +1010,8 @@ async def count_nexus_operations( ) -> NexusOperationExecutionCount: """Called for every :py:meth:`Client.count_nexus_operations` call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ return await self.next.count_nexus_operations(input) diff --git a/temporalio/client/_nexus.py b/temporalio/client/_nexus.py index 1f0a7338ea..ff20b0535e 100644 --- a/temporalio/client/_nexus.py +++ b/temporalio/client/_nexus.py @@ -37,8 +37,9 @@ class NexusOperationExecutionCancellationInfo: """Cancellation information for a Nexus Operation. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ raw: temporalio.api.nexus.v1.NexusOperationExecutionCancellationInfo @@ -115,8 +116,9 @@ async def _from_cancellation_info( class NexusOperationExecution: """Info for a standalone Nexus operation execution, from list response. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ operation_id: str @@ -201,8 +203,9 @@ def _from_raw_info( class NexusOperationExecutionDescription(NexusOperationExecution): """Detailed information about a standalone Nexus operation execution. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ raw_description: temporalio.api.nexus.v1.NexusOperationExecutionInfo @@ -388,8 +391,9 @@ async def _from_execution_info( class NexusOperationExecutionCountAggregationGroup: """A single aggregation group from a count nexus operations call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ count: int @@ -417,8 +421,9 @@ def _from_raw( class NexusOperationExecutionCount: """Representation of a count from a count nexus operations call. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ count: int @@ -448,8 +453,9 @@ def _from_raw( class NexusOperationFailureError(temporalio.exceptions.TemporalError): """Error that occurs when a Nexus operation is unsuccessful. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ def __init__(self, *, cause: BaseException) -> None: @@ -467,8 +473,9 @@ def cause(self) -> BaseException: class NexusClient(ABC, Generic[NexusServiceType]): """Client for starting standalone Nexus operations. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Use :py:meth:`Client.create_nexus_client` to create a client. """ @@ -661,8 +668,9 @@ async def start_operation( ) -> NexusOperationHandle[Any]: """Start a Nexus operation and return a handle. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: operation: The operation to start. Can be a ``nexusrpc.Operation``, @@ -883,8 +891,9 @@ async def execute_operation( ) -> Any: """Start a Nexus operation and wait for its result. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. This is a shortcut for ``await (await nexus_client.start_operation(...)).result()``. @@ -979,8 +988,9 @@ async def start_operation( ) -> NexusOperationHandle[Any]: """Start a Nexus operation and return a handle. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ op_name, output_type = self._resolve_operation(operation) final_result_type: type | None = ( @@ -1028,8 +1038,9 @@ async def execute_operation( ) -> Any: """Start a Nexus operation and wait for its result. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ handle = await self.start_operation( operation, @@ -1053,8 +1064,9 @@ async def execute_operation( class NexusOperationHandle(Generic[ReturnType]): """Handle representing a standalone Nexus operation execution. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ def __init__( @@ -1109,8 +1121,9 @@ async def result( ) -> ReturnType: """Wait for result of the Nexus operation. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. The result may already be known if this method has been called before, in which case no network call is made. Otherwise the result will be @@ -1164,8 +1177,9 @@ async def describe( ) -> NexusOperationExecutionDescription: """Describe the Nexus operation execution. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: rpc_metadata: Headers used on the RPC call. @@ -1192,8 +1206,9 @@ async def cancel( ) -> None: """Request cancellation of the Nexus operation. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: reason: Reason for the cancellation. @@ -1219,8 +1234,9 @@ async def terminate( ) -> None: """Terminate the Nexus operation execution immediately. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Args: reason: Reason for the termination. @@ -1243,8 +1259,9 @@ class NexusOperationExecutionAsyncIterator: You should typically use ``async for`` on this iterator and not call any of its methods. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ def __init__( diff --git a/temporalio/common.py b/temporalio/common.py index 578d714c6a..80d9489617 100644 --- a/temporalio/common.py +++ b/temporalio/common.py @@ -188,8 +188,9 @@ class ActivityIDConflictPolicy(IntEnum): class NexusOperationIDReusePolicy(IntEnum): """How already-closed Nexus operation IDs are handled on start. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. See :py:class:`temporalio.api.enums.v1.NexusOperationIdReusePolicy`. """ @@ -211,8 +212,9 @@ class NexusOperationIDReusePolicy(IntEnum): class NexusOperationIDConflictPolicy(IntEnum): """How already-running Nexus operation IDs are handled on start. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. See :py:class:`temporalio.api.enums.v1.NexusOperationIdConflictPolicy`. """ @@ -231,8 +233,9 @@ class NexusOperationIDConflictPolicy(IntEnum): class NexusOperationExecutionStatus(IntEnum): """Status of a standalone Nexus operation execution. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. See :py:class:`temporalio.api.enums.v1.NexusOperationExecutionStatus`. """ @@ -263,8 +266,9 @@ class NexusOperationExecutionStatus(IntEnum): class PendingNexusOperationExecutionState(IntEnum): """More detailed breakdown of :py:attr:`NexusOperationExecutionStatus.RUNNING`. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. See :py:class:`temporalio.api.enums.v1.PendingNexusOperationState`. """ @@ -289,8 +293,9 @@ class PendingNexusOperationExecutionState(IntEnum): class NexusOperationCancellationState(IntEnum): """State of a Nexus operation cancellation. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. """ UNSPECIFIED = int( diff --git a/temporalio/exceptions.py b/temporalio/exceptions.py index 03a623c21e..42e8b177be 100644 --- a/temporalio/exceptions.py +++ b/temporalio/exceptions.py @@ -111,8 +111,9 @@ def __init__( class NexusOperationAlreadyStartedError(FailureError): """Thrown by a client when a Nexus operation execution has already started. - .. warning:: - This API is experimental and unstable. + .. note:: + Standalone Nexus Operations are in Public Preview. + We aim to preserve backward compatibility and avoid breaking changes. Attributes: operation_id: ID of the already-started operation. From dfb032c99e635d4522bf00508ffc4a6d142fefb2 Mon Sep 17 00:00:00 2001 From: Joie Wu Date: Wed, 14 Oct 2026 11:36:18 -0700 Subject: [PATCH 2/2] Keep standalone Nexus APIs marked experimental --- changelog/stabilized/nimble-nexus-narwhal.md | 1 - temporalio/client/_client.py | 20 ++--- temporalio/client/_interceptor.py | 70 +++++++--------- temporalio/client/_nexus.py | 85 ++++++++------------ temporalio/common.py | 25 +++--- temporalio/exceptions.py | 5 +- 6 files changed, 82 insertions(+), 124 deletions(-) delete mode 100644 changelog/stabilized/nimble-nexus-narwhal.md diff --git a/changelog/stabilized/nimble-nexus-narwhal.md b/changelog/stabilized/nimble-nexus-narwhal.md deleted file mode 100644 index aa3d3938a0..0000000000 --- a/changelog/stabilized/nimble-nexus-narwhal.md +++ /dev/null @@ -1 +0,0 @@ -Standalone Nexus Operations are in Public Preview. We aim to preserve backward compatibility and avoid breaking changes. diff --git a/temporalio/client/_client.py b/temporalio/client/_client.py index 640db46fce..efef5cb528 100644 --- a/temporalio/client/_client.py +++ b/temporalio/client/_client.py @@ -2859,9 +2859,8 @@ def create_nexus_client( ) -> NexusClient[NexusServiceType]: """Create a client for starting standalone Nexus operations. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: service: The Nexus service type or service name string. @@ -2885,9 +2884,8 @@ def list_nexus_operations( ) -> NexusOperationExecutionAsyncIterator: """List standalone Nexus operations. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. This does not make a request until the first iteration is attempted. Therefore any errors will not occur until then. @@ -2929,9 +2927,8 @@ async def count_nexus_operations( ) -> NexusOperationExecutionCount: """Count standalone Nexus operations. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: query: A Temporal visibility filter for nexus operations. @@ -2984,9 +2981,8 @@ def get_nexus_operation_handle( ) -> NexusOperationHandle[Any]: """Get a handle to an existing standalone Nexus operation. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: operation_id: The operation ID. diff --git a/temporalio/client/_interceptor.py b/temporalio/client/_interceptor.py index f83142daf2..68077ebc93 100644 --- a/temporalio/client/_interceptor.py +++ b/temporalio/client/_interceptor.py @@ -585,9 +585,8 @@ class GetWorkerTaskReachabilityInput: class StartNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.start_nexus_operation`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ operation: str @@ -612,9 +611,8 @@ class StartNexusOperationInput: class DescribeNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.describe_nexus_operation`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ operation_id: str @@ -627,9 +625,8 @@ class DescribeNexusOperationInput: class GetNexusOperationResultInput: """Input for :py:meth:`OutboundInterceptor.get_nexus_operation_result`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ operation_id: str @@ -646,9 +643,8 @@ class GetNexusOperationResultInput: class CancelNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.cancel_nexus_operation`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ operation_id: str @@ -662,9 +658,8 @@ class CancelNexusOperationInput: class TerminateNexusOperationInput: """Input for :py:meth:`OutboundInterceptor.terminate_nexus_operation`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ operation_id: str @@ -678,9 +673,8 @@ class TerminateNexusOperationInput: class ListNexusOperationsInput: """Input for :py:meth:`OutboundInterceptor.list_nexus_operations`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ query: str | None @@ -695,9 +689,8 @@ class ListNexusOperationsInput: class CountNexusOperationsInput: """Input for :py:meth:`OutboundInterceptor.count_nexus_operations`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ query: str | None @@ -946,9 +939,8 @@ async def start_nexus_operation( ) -> NexusOperationHandle[Any]: """Called for every :py:meth:`NexusClient.start_operation` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ return await self.next.start_nexus_operation(input) @@ -957,9 +949,8 @@ async def describe_nexus_operation( ) -> NexusOperationExecutionDescription: """Called for every :py:meth:`NexusOperationHandle.describe` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ return await self.next.describe_nexus_operation(input) @@ -968,18 +959,16 @@ async def get_nexus_operation_result( ) -> Any: """Called for every :py:meth:`NexusOperationHandle.result` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ return await self.next.get_nexus_operation_result(input) async def cancel_nexus_operation(self, input: CancelNexusOperationInput) -> None: """Called for every :py:meth:`NexusOperationHandle.cancel` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ await self.next.cancel_nexus_operation(input) @@ -988,9 +977,8 @@ async def terminate_nexus_operation( ) -> None: """Called for every :py:meth:`NexusOperationHandle.terminate` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ await self.next.terminate_nexus_operation(input) @@ -999,9 +987,8 @@ def list_nexus_operations( ) -> NexusOperationExecutionAsyncIterator: """Called for every :py:meth:`Client.list_nexus_operations` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ return self.next.list_nexus_operations(input) @@ -1010,8 +997,7 @@ async def count_nexus_operations( ) -> NexusOperationExecutionCount: """Called for every :py:meth:`Client.count_nexus_operations` call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ return await self.next.count_nexus_operations(input) diff --git a/temporalio/client/_nexus.py b/temporalio/client/_nexus.py index ff20b0535e..1f0a7338ea 100644 --- a/temporalio/client/_nexus.py +++ b/temporalio/client/_nexus.py @@ -37,9 +37,8 @@ class NexusOperationExecutionCancellationInfo: """Cancellation information for a Nexus Operation. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ raw: temporalio.api.nexus.v1.NexusOperationExecutionCancellationInfo @@ -116,9 +115,8 @@ async def _from_cancellation_info( class NexusOperationExecution: """Info for a standalone Nexus operation execution, from list response. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ operation_id: str @@ -203,9 +201,8 @@ def _from_raw_info( class NexusOperationExecutionDescription(NexusOperationExecution): """Detailed information about a standalone Nexus operation execution. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ raw_description: temporalio.api.nexus.v1.NexusOperationExecutionInfo @@ -391,9 +388,8 @@ async def _from_execution_info( class NexusOperationExecutionCountAggregationGroup: """A single aggregation group from a count nexus operations call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ count: int @@ -421,9 +417,8 @@ def _from_raw( class NexusOperationExecutionCount: """Representation of a count from a count nexus operations call. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ count: int @@ -453,9 +448,8 @@ def _from_raw( class NexusOperationFailureError(temporalio.exceptions.TemporalError): """Error that occurs when a Nexus operation is unsuccessful. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ def __init__(self, *, cause: BaseException) -> None: @@ -473,9 +467,8 @@ def cause(self) -> BaseException: class NexusClient(ABC, Generic[NexusServiceType]): """Client for starting standalone Nexus operations. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Use :py:meth:`Client.create_nexus_client` to create a client. """ @@ -668,9 +661,8 @@ async def start_operation( ) -> NexusOperationHandle[Any]: """Start a Nexus operation and return a handle. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: operation: The operation to start. Can be a ``nexusrpc.Operation``, @@ -891,9 +883,8 @@ async def execute_operation( ) -> Any: """Start a Nexus operation and wait for its result. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. This is a shortcut for ``await (await nexus_client.start_operation(...)).result()``. @@ -988,9 +979,8 @@ async def start_operation( ) -> NexusOperationHandle[Any]: """Start a Nexus operation and return a handle. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ op_name, output_type = self._resolve_operation(operation) final_result_type: type | None = ( @@ -1038,9 +1028,8 @@ async def execute_operation( ) -> Any: """Start a Nexus operation and wait for its result. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ handle = await self.start_operation( operation, @@ -1064,9 +1053,8 @@ async def execute_operation( class NexusOperationHandle(Generic[ReturnType]): """Handle representing a standalone Nexus operation execution. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ def __init__( @@ -1121,9 +1109,8 @@ async def result( ) -> ReturnType: """Wait for result of the Nexus operation. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. The result may already be known if this method has been called before, in which case no network call is made. Otherwise the result will be @@ -1177,9 +1164,8 @@ async def describe( ) -> NexusOperationExecutionDescription: """Describe the Nexus operation execution. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: rpc_metadata: Headers used on the RPC call. @@ -1206,9 +1192,8 @@ async def cancel( ) -> None: """Request cancellation of the Nexus operation. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: reason: Reason for the cancellation. @@ -1234,9 +1219,8 @@ async def terminate( ) -> None: """Terminate the Nexus operation execution immediately. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Args: reason: Reason for the termination. @@ -1259,9 +1243,8 @@ class NexusOperationExecutionAsyncIterator: You should typically use ``async for`` on this iterator and not call any of its methods. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ def __init__( diff --git a/temporalio/common.py b/temporalio/common.py index 80d9489617..578d714c6a 100644 --- a/temporalio/common.py +++ b/temporalio/common.py @@ -188,9 +188,8 @@ class ActivityIDConflictPolicy(IntEnum): class NexusOperationIDReusePolicy(IntEnum): """How already-closed Nexus operation IDs are handled on start. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. See :py:class:`temporalio.api.enums.v1.NexusOperationIdReusePolicy`. """ @@ -212,9 +211,8 @@ class NexusOperationIDReusePolicy(IntEnum): class NexusOperationIDConflictPolicy(IntEnum): """How already-running Nexus operation IDs are handled on start. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. See :py:class:`temporalio.api.enums.v1.NexusOperationIdConflictPolicy`. """ @@ -233,9 +231,8 @@ class NexusOperationIDConflictPolicy(IntEnum): class NexusOperationExecutionStatus(IntEnum): """Status of a standalone Nexus operation execution. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. See :py:class:`temporalio.api.enums.v1.NexusOperationExecutionStatus`. """ @@ -266,9 +263,8 @@ class NexusOperationExecutionStatus(IntEnum): class PendingNexusOperationExecutionState(IntEnum): """More detailed breakdown of :py:attr:`NexusOperationExecutionStatus.RUNNING`. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. See :py:class:`temporalio.api.enums.v1.PendingNexusOperationState`. """ @@ -293,9 +289,8 @@ class PendingNexusOperationExecutionState(IntEnum): class NexusOperationCancellationState(IntEnum): """State of a Nexus operation cancellation. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. """ UNSPECIFIED = int( diff --git a/temporalio/exceptions.py b/temporalio/exceptions.py index 42e8b177be..03a623c21e 100644 --- a/temporalio/exceptions.py +++ b/temporalio/exceptions.py @@ -111,9 +111,8 @@ def __init__( class NexusOperationAlreadyStartedError(FailureError): """Thrown by a client when a Nexus operation execution has already started. - .. note:: - Standalone Nexus Operations are in Public Preview. - We aim to preserve backward compatibility and avoid breaking changes. + .. warning:: + This API is experimental and unstable. Attributes: operation_id: ID of the already-started operation.