github temporalio/sdk-python 1.33.0

7 days ago

Notable Changes

Added

Standalone Activity operator commands

  • ActivityHandle now supports operator commands for standalone activities: pause,
    unpause, update_options and restore_original_options.
  • Added GCP Cloud Run serverless-worker OpenTelemetry plugin in temporalio.contrib.opentelemetry.
  • Added new options to ActivityHandle.describe() to retrieve associated payloads, such as activity input and outcome.
  • New properties and methods in ActivityExecution and ActivityExecutionDescription.
  • Added experimental temporalio.converter.NexusSerializationContext support for Nexus callers
    and handlers. Callers use it for inputs, results, and failures; handlers use it for inputs,
    synchronous results, and failures. Asynchronous handler results and detached standalone handles
    are not yet supported. Standalone USE_EXISTING handles use their start request's context.

Changed

  • Standalone Activities are now generally available (GA). (Standalone Activities as Nexus operations
    and Standalone Activities operator commands remain experimental. Operator commands are pause,
    unpause, updateOptions, restoreOriginal.)
  • System Nexus Signal-with-Start Workflow operations now use the typed
    WorkflowOutboundInterceptor.start_signal_with_start_workflow interception point instead of
    the generic WorkflowOutboundInterceptor.start_nexus_operation method.
  • System Nexus Signal-with-Start Workflow operations now invoke
    WorkflowOutboundInterceptor.start_system_nexus_operation after their typed interception
    point. They continue not to invoke WorkflowOutboundInterceptor.start_nexus_operation.
  • The experimental GetNexusOperationResultInput now includes the Nexus endpoint, service, and
    operation.

💥 Breaking Changes

  • Experimental external storage: ExternalStorage.driver_selector is now called with a
    StorageDriverSelectContext instead of a StorageDriverStoreContext. Update the annotation;
    the new type carries the same target field. Since selectors are plain callables, a stale
    annotation fails type checking rather than at runtime.
  • client.ActivityExecution and client.ActivityExecutionDescription had some fields removed or renamed
    to match RPC API.
    • Dataclass parameters for these types were changed to frozen=True, eq=False, kw_only=True.
    • scheduled_time was renamed schedule_time.
    • last_failure was changed from field to method that runs data converter on demand.
    • state_transition_count, eager_execution_requested, paused and long_poll_token were removed.
  • ActivityHandle.describe() long-poll token was removed. The functionality can still be used manually
    through raw gRPC API.

Fixed

  • temporalio.contrib.deepagents no longer dedups repeated identical tool,
    model, and backend-op calls: each dispatch runs its own Activity, and the
    continue-as-new result cache is retired for new executions (a continued run
    resumes from the carried transcript and never re-executes prior dispatches,
    so a carried cache entry could only serve stale results). Patch-gated
    (deepagents.retire-result-cache), so histories recorded before this change
    replay unchanged; note that deferring the patch keeps the full legacy dedup
    cache — including the stale-result behavior this entry describes — and that
    a chain upgraded mid-continue-as-new re-executes rather than reuses a
    repeated identical call (the conservative direction).

  • contrib.deepagents: summarization middleware configured with a model name string now routes its LLM calls through Activities instead of running them in the Workflow.

  • Experimental: External storage metrics now report the wall-clock time storage was in flight.
    Previously each batch's duration was summed, over-reporting the time whenever storage operations
    ran concurrently.

  • System Nexus Signal-with-Start workflow operations now give custom payload
    converters the target workflow's serialization context when encoding their
    inner request payloads.

  • Cancelling an activity from a signal while the workflow itself is cancelled
    no longer causes a nondeterminism error from duplicate activity-cancellation
    commands.

  • StrandsPlugin now disables Botocore retries for its default Bedrock model so
    model request retries are handled exclusively by Temporal.

  • temporalio.contrib.openai_agents now honors the retry-after-ms and
    retry-after headers when OpenAI returns x-should-retry: true. Previously
    the delay the server asked for was discarded on that path and the activity
    retried on its configured interval instead.

  • Nexus-context workflow/activity starts no longer set on_conflict_options when there are no links
    or callbacks to attach.

  • The workflow sandbox now passes pydantic_core through by default, alongside pydantic.

SDK Core

info: syncing channel updates for 1.94-x86_64-unknown-linux-gnu
info: latest update on 2026-03-26 for version 1.94.1 (e408947bf 2026-03-25)
info: downloading 5 components
warn: the missing active toolchain 1.94-x86_64-unknown-linux-gnu has been auto-installed
warn: this might cause rustup commands to take longer time to finish than expected
info: you may opt out with RUSTUP_AUTO_INSTALL=0 or rustup set auto-install disable

Changelog

Added

  • Language SDKs can opt in to recording local activity arguments in the local activity marker's
    input detail.
  • Workflow completion-as-cancelled commands can now carry details for recording on the terminal
    history event.
  • Core now supports attaching EventGroupMarkers to most workflow commands.
  • The temporal_activity_execution_failed and temporal_local_activity_execution_failed worker
    metrics now carry a failure_reason attribute. Each is now split into one time series per
    reason, which may affect existing dashboards.
  • Workflow task completions larger than the gRPC request size limit are now paginated automatically when the namespace supports it. Paginated workflow task completions require Temporal Server 1.32.0 or later.

Breaking Changes 💥

  • The following types are now non-exhaustive: Priority, WorkerDeploymentVersion,
    WorkerCallbacks, WorkflowExecutionInfo, ActivityCloseTimeouts,
    ActivityExecutionDecodeHint, child-workflow and signal decode hints,
    SerializationContext, SerializationContextData, PayloadConverter, IncomingError,
    ScheduleSpec, and ScheduleOverlapPolicy. Construct structs using their respective builders
    or constructors (WorkerCallbacks::new, ActivityExecutionDecodeHint::new, or
    SerializationContext::new); use Default for PayloadConverter; and add wildcard branches
    when matching enums.
  • Renamed ActivityCloseTimeouts::Both to ActivityCloseTimeouts::ScheduleAndStartToClose.
  • Removed the unused ActExitValue type. Use ActivityError::WillCompleteAsync to mark an
    activity for asynchronous completion.
  • Removed the test-only FailOnNondeterminismInterceptor from the public API.
  • TaskToken no longer exposes its underlying bytes directly. Use TaskToken::into_inner() to
    consume a token into its bytes.

Fixed

  • Worker shutdown now drains activity completions that are still flushing their result to the
    server before finishing. Previously such a completion — typically one whose final heartbeat RPC
    was still in flight — could be permanently stranded by shutdown: the activity's result was
    never reported (the server had to time the attempt out before retrying it), and workers missed
    shutdown's slot-permit release deadline, panicking in debug builds.
  • The Prometheus exporter now appends _total to counter metric names when an SDK enables the
    counter suffix option.
  • Update-with-start ExecuteMultiOperation calls now use Core's long-poll timeout instead of the
    normal RPC timeout, avoiding premature failures while waiting for an update to reach its
    requested stage.
  • An activity failure caused by oversized final heartbeat details is now counted in the
    temporal_activity_execution_failed metric as failure_reason="PayloadsTooLarge". Previously it
    was counted under the reason for the failure the activity itself reported, and was not counted at
    all when that failure was benign, even though a payload-limit failure was reported instead.
  • Workers now warn when autoscaling task polling encounters errors continuously for one minute.
    Repeated warnings use exponential backoff up to 15-minute intervals and stop after polling
    recovers.
  • Workers with a small workflow cache no longer briefly stop accepting new workflows. Sticky
    workflow-task pollers could consume every workflow-cache permit and starve the non-sticky poller,
    so the worker would stop picking up new workflows until a poll timed out (up to ~60s). The poll
    balancer now reserves a non-sticky slot against the workflow cache size rather than the slot
    supplier size.

Commits

What's Changed

New Contributors

Full Changelog: 1.31.0...1.33.0

Don't miss a new sdk-python release

NewReleases is sending notifications on new releases.