@@ -669,6 +669,7 @@ def workflow_continue_as_new(
669669 retry_policy : Optional [temporalio .common .RetryPolicy ],
670670 memo : Optional [Mapping [str , Any ]],
671671 search_attributes : Optional [temporalio .common .SearchAttributes ],
672+ versioning_intent : Optional [temporalio .workflow .VersioningIntent ],
672673 ) -> NoReturn :
673674 # Use definition if callable
674675 name : Optional [str ] = None
@@ -694,6 +695,7 @@ def workflow_continue_as_new(
694695 search_attributes = search_attributes ,
695696 headers = {},
696697 arg_types = arg_types ,
698+ versioning_intent = versioning_intent ,
697699 )
698700 )
699701 # TODO(cretz): Why can't MyPy infer the above never returns?
@@ -820,6 +822,7 @@ def workflow_start_activity(
820822 retry_policy : Optional [temporalio .common .RetryPolicy ],
821823 cancellation_type : temporalio .workflow .ActivityCancellationType ,
822824 activity_id : Optional [str ],
825+ versioning_intent : Optional [temporalio .workflow .VersioningIntent ],
823826 ) -> temporalio .workflow .ActivityHandle [Any ]:
824827 # Get activity definition if it's callable
825828 name : str
@@ -851,6 +854,7 @@ def workflow_start_activity(
851854 disable_eager_execution = self ._disable_eager_activity_execution ,
852855 arg_types = arg_types ,
853856 ret_type = ret_type ,
857+ versioning_intent = versioning_intent ,
854858 )
855859 )
856860
@@ -871,6 +875,7 @@ async def workflow_start_child_workflow(
871875 cron_schedule : str ,
872876 memo : Optional [Mapping [str , Any ]],
873877 search_attributes : Optional [temporalio .common .SearchAttributes ],
878+ versioning_intent : Optional [temporalio .workflow .VersioningIntent ],
874879 ) -> temporalio .workflow .ChildWorkflowHandle [Any , Any ]:
875880 # Use definition if callable
876881 name : str
@@ -905,6 +910,7 @@ async def workflow_start_child_workflow(
905910 headers = {},
906911 arg_types = arg_types ,
907912 ret_type = ret_type ,
913+ versioning_intent = versioning_intent ,
908914 )
909915 )
910916
@@ -1679,6 +1685,10 @@ def _apply_schedule_command(
16791685 command .schedule_activity .do_not_eagerly_execute = (
16801686 self ._input .disable_eager_execution
16811687 )
1688+ if self ._input .versioning_intent :
1689+ command .schedule_activity .versioning_intent = (
1690+ self ._input .versioning_intent ._to_proto ()
1691+ )
16821692 if isinstance (self ._input , StartLocalActivityInput ):
16831693 if self ._input .local_retry_threshold :
16841694 command .schedule_local_activity .local_retry_threshold .FromTimedelta (
@@ -1810,6 +1820,8 @@ def _apply_start_command(
18101820 "temporalio.bridge.proto.child_workflow.ChildWorkflowCancellationType.ValueType" ,
18111821 int (self ._input .cancellation_type ),
18121822 )
1823+ if self ._input .versioning_intent :
1824+ v .versioning_intent = self ._input .versioning_intent ._to_proto ()
18131825
18141826 # If request cancel external, result does _not_ have seq
18151827 def _apply_cancel_command (
@@ -1907,6 +1919,8 @@ def _apply_command(
19071919 _encode_search_attributes (
19081920 self ._input .search_attributes , v .search_attributes
19091921 )
1922+ if self ._input .versioning_intent :
1923+ v .versioning_intent = self ._input .versioning_intent ._to_proto ()
19101924
19111925
19121926def _encode_search_attributes (
0 commit comments