Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: temporalio/sdk-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.6.0
Choose a base ref
...
head repository: temporalio/sdk-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on May 9, 2024

  1. Copy the full SHA
    f96679b View commit details

Commits on May 15, 2024

  1. Copy the full SHA
    a52f25d View commit details

Commits on May 20, 2024

  1. Required wait update stage, update polling improvements, and other up…

    …date changes (#521)
    
    Fixes #484
    Fixes #424
    Fixes #485
    Fixes #514
    cretz authored May 20, 2024
    Copy the full SHA
    11a97d1 View commit details

Commits on May 28, 2024

  1. Fix flaky test (#534)

    cretz authored May 28, 2024
    Copy the full SHA
    aa26503 View commit details
  2. Copy the full SHA
    afadc15 View commit details

Commits on Jun 4, 2024

  1. Copy the full SHA
    365cead View commit details
  2. Copy the full SHA
    2061835 View commit details

Commits on Jun 5, 2024

  1. Copy the full SHA
    5aeac47 View commit details

Commits on Jun 6, 2024

  1. Copy the full SHA
    2d65d82 View commit details
  2. Copy the full SHA
    58d6951 View commit details

Commits on Jun 10, 2024

  1. Copy the full SHA
    927415a View commit details

Commits on Jun 17, 2024

  1. Copy the full SHA
    18b890e View commit details
  2. Copy the full SHA
    2bb211e View commit details

Commits on Jun 18, 2024

  1. Copy the full SHA
    4f646c2 View commit details

Commits on Jun 20, 2024

  1. Copy the full SHA
    2331aa4 View commit details

Commits on Jun 26, 2024

  1. New API to wait for handler executions to complete and warnings on un…

    …finished handler executions (#556)
    
    * Implement warning on unfinished signals and updates
    * Implement all_handlers_finished
    dandavison authored Jun 26, 2024
    Copy the full SHA
    2c1ac54 View commit details
  2. Copy the full SHA
    7ac4445 View commit details

Commits on Jul 1, 2024

  1. Use ruff to auto-format code and sort imports. (#566)

    * Use ruff to format and sort imports
    dandavison authored Jul 1, 2024
    Copy the full SHA
    38d9eef View commit details

Commits on Jul 9, 2024

  1. Copy the full SHA
    530cadf View commit details

Commits on Jul 10, 2024

  1. Copy the full SHA
    bcbacc2 View commit details

Commits on Jul 12, 2024

  1. Copy the full SHA
    c57df81 View commit details

Commits on Jul 17, 2024

  1. Use minimal scope with pytest.raises (#582)

    * Fix indentation bug in test
    
    * Use pytest.raises() with minimal scope
    
    This is a style fix; none of these are incorrect AFAICS
    
    * Fix assertions about client-side cancellation / failure errors
    dandavison authored Jul 17, 2024
    Copy the full SHA
    e409d32 View commit details
  2. Support query for listing schedules (#581)

    Fixes #573
    cretz authored Jul 17, 2024
    Copy the full SHA
    913b4b6 View commit details

Commits on Jul 18, 2024

  1. Use GH ARM runner (#580)

    Fixes #565
    cretz authored Jul 18, 2024
    Copy the full SHA
    3796ec3 View commit details

Commits on Jul 19, 2024

  1. Update cibuildwheel (#589)

    cretz authored Jul 19, 2024
    Copy the full SHA
    c4b1a01 View commit details

Commits on Jul 24, 2024

  1. Copy the full SHA
    a839196 View commit details

Commits on Aug 5, 2024

  1. Honor all non-completion commands (#569)

    * Honor commands generated after the first completion command
    dandavison authored Aug 5, 2024
    Copy the full SHA
    50914c4 View commit details

Commits on Aug 6, 2024

  1. Copy the full SHA
    9142cdd View commit details

Commits on Aug 8, 2024

  1. Copy the full SHA
    4b93d1a View commit details

Commits on Aug 9, 2024

  1. Create commands after payload conversion (#591)

    Fixes #540
    Fixes #564
    cretz authored Aug 9, 2024
    Copy the full SHA
    a5b9661 View commit details

Commits on Aug 19, 2024

  1. Copy the full SHA
    73a1673 View commit details
  2. Unfinished handlers: add rule to warning message; test CAN, dynamic, …

    …and late-registered handlers (#612)
    dandavison authored Aug 19, 2024
    Copy the full SHA
    97688cc View commit details

Commits on Aug 20, 2024

  1. Update Core (#605)

    Sushisource authored Aug 20, 2024
    Copy the full SHA
    185ce8c View commit details
  2. Copy the full SHA
    ed9112a View commit details

Commits on Aug 26, 2024

  1. Copy the full SHA
    927abdc View commit details
  2. Create and upload junit-xml artifacts (#617)

    With this PR we start storing junit-xml output from test runs, in order to allow tools to be used to display and query test data. Given appropriate tools, this should have some advantages, e.g.
    - understanding patterns of flakiness in tests across matrix builds within a run, and across runs
    - easier understanding of how one particular build has failed
    dandavison authored Aug 26, 2024
    Copy the full SHA
    4e97841 View commit details

Commits on Aug 27, 2024

  1. Fix exception-swallowing code path (#623)

    * Failing test
    * Fix exception-swallowing code path
    dandavison authored Aug 27, 2024
    Copy the full SHA
    7af99d0 View commit details
  2. Copy the full SHA
    4aef4bf View commit details

Commits on Sep 6, 2024

  1. Pin to 3.12.4 (#635)

    dandavison authored Sep 6, 2024
    Copy the full SHA
    a18140f View commit details
  2. Copy the full SHA
    59d04a6 View commit details

Commits on Sep 11, 2024

  1. Copy the full SHA
    09ac120 View commit details

Commits on Sep 24, 2024

  1. Workflow init (#645)

    * Introduce @workflow.init decorator
    dandavison authored Sep 24, 2024
    Copy the full SHA
    0995ae0 View commit details

Commits on Sep 25, 2024

  1. Copy the full SHA
    3cf1b85 View commit details
  2. Copy the full SHA
    a1b5d65 View commit details

Commits on Sep 30, 2024

  1. Copy the full SHA
    2e6d742 View commit details

Commits on Oct 3, 2024

  1. Copy the full SHA
    badbb9e View commit details

Commits on Oct 8, 2024

  1. Tweak docstring (#662)

    dandavison authored Oct 8, 2024
    Copy the full SHA
    7c7516d View commit details

Commits on Oct 10, 2024

  1. 1.8.0 version bumps (#665)

    * Bump version
    
    * Use features repo main
    dandavison authored Oct 10, 2024
    Copy the full SHA
    b162151 View commit details

Commits on Oct 30, 2024

  1. Copy the full SHA
    0b327b0 View commit details

Commits on Nov 6, 2024

  1. Include update info in logging output (#664)

    * Make LoggerAdapter behavior identical to merge_extra=True
    * Add update info to logging `extra`
    dandavison authored Nov 6, 2024
    Copy the full SHA
    723d234 View commit details
Showing with 52,304 additions and 8,286 deletions.
  1. +30 −33 .github/workflows/build-binaries.yml
  2. +67 −40 .github/workflows/ci.yml
  3. +18 −0 .github/workflows/omes.yml
  4. +15 −9 .github/workflows/run-bench.yml
  5. +2 −0 .gitignore
  6. +178 −92 README.md
  7. +0 −28 build.py
  8. +0 −1,922 poetry.lock
  9. +130 −103 pyproject.toml
  10. +5 −3 scripts/_proto/Dockerfile
  11. +3 −1 scripts/_proto/Dockerfile.dockerignore
  12. +0 −84 scripts/fix_wheel.py
  13. +3 −1 scripts/gen_protos.py
  14. +0 −27 scripts/setup_bridge.py
  15. +8 −9 temporalio/activity.py
  16. 0 temporalio/api/activity/__init__.py
  17. +5 −0 temporalio/api/activity/v1/__init__.py
  18. +48 −0 temporalio/api/activity/v1/message_pb2.py
  19. +111 −0 temporalio/api/activity/v1/message_pb2.pyi
  20. +6 −0 temporalio/api/batch/v1/__init__.py
  21. +76 −19 temporalio/api/batch/v1/message_pb2.py
  22. +194 −22 temporalio/api/batch/v1/message_pb2.pyi
  23. 0 temporalio/api/cloud/__init__.py
  24. 0 temporalio/api/cloud/account/__init__.py
  25. +8 −0 temporalio/api/cloud/account/v1/__init__.py
  26. +85 −0 temporalio/api/cloud/account/v1/message_pb2.py
  27. +142 −0 temporalio/api/cloud/account/v1/message_pb2.pyi
  28. 0 temporalio/api/cloud/cloudservice/__init__.py
  29. +213 −0 temporalio/api/cloud/cloudservice/v1/__init__.py
  30. +1,462 −0 temporalio/api/cloud/cloudservice/v1/request_response_pb2.py
  31. +2,928 −0 temporalio/api/cloud/cloudservice/v1/request_response_pb2.pyi
  32. +4 −0 temporalio/api/cloud/cloudservice/v1/request_response_pb2_grpc.py
  33. +4 −0 temporalio/api/cloud/cloudservice/v1/request_response_pb2_grpc.pyi
  34. +264 −0 temporalio/api/cloud/cloudservice/v1/service_pb2.py
  35. +8 −0 temporalio/api/cloud/cloudservice/v1/service_pb2.pyi
  36. +2,162 −0 temporalio/api/cloud/cloudservice/v1/service_pb2_grpc.py
  37. +605 −0 temporalio/api/cloud/cloudservice/v1/service_pb2_grpc.pyi
  38. 0 temporalio/api/cloud/identity/__init__.py
  39. +33 −0 temporalio/api/cloud/identity/v1/__init__.py
  40. +261 −0 temporalio/api/cloud/identity/v1/message_pb2.py
  41. +841 −0 temporalio/api/cloud/identity/v1/message_pb2.pyi
  42. 0 temporalio/api/cloud/namespace/__init__.py
  43. +31 −0 temporalio/api/cloud/namespace/v1/__init__.py
  44. +286 −0 temporalio/api/cloud/namespace/v1/message_pb2.py
  45. +880 −0 temporalio/api/cloud/namespace/v1/message_pb2.pyi
  46. 0 temporalio/api/cloud/nexus/__init__.py
  47. +17 −0 temporalio/api/cloud/nexus/v1/__init__.py
  48. +117 −0 temporalio/api/cloud/nexus/v1/message_pb2.py
  49. +264 −0 temporalio/api/cloud/nexus/v1/message_pb2.pyi
  50. 0 temporalio/api/cloud/operation/__init__.py
  51. +5 −0 temporalio/api/cloud/operation/v1/__init__.py
  52. +48 −0 temporalio/api/cloud/operation/v1/message_pb2.py
  53. +154 −0 temporalio/api/cloud/operation/v1/message_pb2.pyi
  54. 0 temporalio/api/cloud/region/__init__.py
  55. +5 −0 temporalio/api/cloud/region/v1/__init__.py
  56. +46 −0 temporalio/api/cloud/region/v1/message_pb2.py
  57. +93 −0 temporalio/api/cloud/region/v1/message_pb2.pyi
  58. 0 temporalio/api/cloud/resource/__init__.py
  59. +5 −0 temporalio/api/cloud/resource/v1/__init__.py
  60. +42 −0 temporalio/api/cloud/resource/v1/message_pb2.py
  61. +76 −0 temporalio/api/cloud/resource/v1/message_pb2.pyi
  62. 0 temporalio/api/cloud/sink/__init__.py
  63. +6 −0 temporalio/api/cloud/sink/v1/__init__.py
  64. +53 −0 temporalio/api/cloud/sink/v1/message_pb2.py
  65. +101 −0 temporalio/api/cloud/sink/v1/message_pb2.pyi
  66. 0 temporalio/api/cloud/usage/__init__.py
  67. +19 −0 temporalio/api/cloud/usage/v1/__init__.py
  68. +106 −0 temporalio/api/cloud/usage/v1/message_pb2.py
  69. +213 −0 temporalio/api/cloud/usage/v1/message_pb2.pyi
  70. +1 −0 temporalio/api/cluster/v1/message_pb2.py
  71. +4 −1 temporalio/api/cluster/v1/message_pb2.pyi
  72. +1 −0 temporalio/api/cluster/v1/message_pb2_grpc.py
  73. +4 −0 temporalio/api/command/v1/__init__.py
  74. +143 −80 temporalio/api/command/v1/message_pb2.py
  75. +221 −48 temporalio/api/command/v1/message_pb2.pyi
  76. +6 −0 temporalio/api/common/v1/__init__.py
  77. +2 −1 temporalio/api/common/v1/grpc_status_pb2.py
  78. +3 −1 temporalio/api/common/v1/grpc_status_pb2.pyi
  79. +198 −55 temporalio/api/common/v1/message_pb2.py
  80. +369 −38 temporalio/api/common/v1/message_pb2.pyi
  81. 0 temporalio/api/deployment/__init__.py
  82. +27 −0 temporalio/api/deployment/v1/__init__.py
  83. +297 −0 temporalio/api/deployment/v1/message_pb2.py
  84. +864 −0 temporalio/api/deployment/v1/message_pb2.pyi
  85. +41 −6 temporalio/api/enums/v1/__init__.py
  86. +6 −4 temporalio/api/enums/v1/batch_operation_pb2.py
  87. +6 −23 temporalio/api/enums/v1/batch_operation_pb2.pyi
  88. +5 −2 temporalio/api/enums/v1/command_type_pb2.py
  89. +8 −23 temporalio/api/enums/v1/command_type_pb2.pyi
  90. +54 −1 temporalio/api/enums/v1/common_pb2.py
  91. +222 −23 temporalio/api/enums/v1/common_pb2.pyi
  92. +49 −0 temporalio/api/enums/v1/deployment_pb2.py
  93. +188 −0 temporalio/api/enums/v1/deployment_pb2.pyi
  94. +14 −3 temporalio/api/enums/v1/event_type_pb2.py
  95. +67 −40 temporalio/api/enums/v1/event_type_pb2.pyi
  96. +27 −16 temporalio/api/enums/v1/failed_cause_pb2.py
  97. +302 −95 temporalio/api/enums/v1/failed_cause_pb2.pyi
  98. +1 −0 temporalio/api/enums/v1/namespace_pb2.py
  99. +4 −23 temporalio/api/enums/v1/namespace_pb2.pyi
  100. +38 −0 temporalio/api/enums/v1/nexus_pb2.py
  101. +63 −0 temporalio/api/enums/v1/nexus_pb2.pyi
  102. +1 −0 temporalio/api/enums/v1/query_pb2.py
  103. +4 −23 temporalio/api/enums/v1/query_pb2.pyi
  104. +15 −6 temporalio/api/enums/v1/reset_pb2.py
  105. +17 −28 temporalio/api/enums/v1/reset_pb2.pyi
  106. +1 −0 temporalio/api/enums/v1/schedule_pb2.py
  107. +4 −23 temporalio/api/enums/v1/schedule_pb2.pyi
  108. +21 −5 temporalio/api/enums/v1/task_queue_pb2.py
  109. +97 −23 temporalio/api/enums/v1/task_queue_pb2.pyi
  110. +9 −10 temporalio/api/enums/v1/update_pb2.py
  111. +62 −68 temporalio/api/enums/v1/update_pb2.pyi
  112. +35 −17 temporalio/api/enums/v1/workflow_pb2.py
  113. +165 −31 temporalio/api/enums/v1/workflow_pb2.pyi
  114. +4 −0 temporalio/api/errordetails/v1/__init__.py
  115. +99 −46 temporalio/api/errordetails/v1/message_pb2.py
  116. +110 −2 temporalio/api/errordetails/v1/message_pb2.pyi
  117. +3 −2 temporalio/api/export/v1/message_pb2.py
  118. +4 −22 temporalio/api/export/v1/message_pb2.pyi
  119. +6 −0 temporalio/api/failure/v1/__init__.py
  120. +83 −28 temporalio/api/failure/v1/message_pb2.py
  121. +145 −24 temporalio/api/failure/v1/message_pb2.pyi
  122. +5 −4 temporalio/api/filter/v1/message_pb2.py
  123. +4 −22 temporalio/api/filter/v1/message_pb2.pyi
  124. +22 −2 temporalio/api/history/v1/__init__.py
  125. +594 −280 temporalio/api/history/v1/message_pb2.py
  126. +973 −83 temporalio/api/history/v1/message_pb2.pyi
  127. +5 −4 temporalio/api/interaction/v1/message_pb2.py
  128. +7 −2 temporalio/api/interaction/v1/message_pb2.pyi
  129. +44 −30 temporalio/api/namespace/v1/message_pb2.py
  130. +53 −24 temporalio/api/namespace/v1/message_pb2.pyi
  131. 0 temporalio/api/nexus/__init__.py
  132. +31 −0 temporalio/api/nexus/v1/__init__.py
  133. +317 −0 temporalio/api/nexus/v1/message_pb2.py
  134. +760 −0 temporalio/api/nexus/v1/message_pb2.pyi
  135. +20 −0 temporalio/api/operatorservice/v1/__init__.py
  136. +220 −58 temporalio/api/operatorservice/v1/request_response_pb2.py
  137. +271 −31 temporalio/api/operatorservice/v1/request_response_pb2.pyi
  138. +1 −0 temporalio/api/operatorservice/v1/request_response_pb2_grpc.py
  139. +0 −21 temporalio/api/operatorservice/v1/request_response_pb2_grpc.pyi
  140. +24 −5 temporalio/api/operatorservice/v1/service_pb2.py
  141. +1 −21 temporalio/api/operatorservice/v1/service_pb2.pyi
  142. +239 −6 temporalio/api/operatorservice/v1/service_pb2_grpc.py
  143. +96 −48 temporalio/api/operatorservice/v1/service_pb2_grpc.pyi
  144. +2 −1 temporalio/api/protocol/v1/message_pb2.py
  145. +3 −22 temporalio/api/protocol/v1/message_pb2.pyi
  146. +14 −10 temporalio/api/query/v1/message_pb2.py
  147. +25 −25 temporalio/api/query/v1/message_pb2.pyi
  148. +4 −3 temporalio/api/replication/v1/message_pb2.py
  149. +4 −22 temporalio/api/replication/v1/message_pb2.pyi
  150. 0 temporalio/api/rules/__init__.py
  151. +7 −0 temporalio/api/rules/v1/__init__.py
  152. +99 −0 temporalio/api/rules/v1/message_pb2.py
  153. +220 −0 temporalio/api/rules/v1/message_pb2.pyi
  154. +53 −49 temporalio/api/schedule/v1/message_pb2.py
  155. +23 −1 temporalio/api/schedule/v1/message_pb2.pyi
  156. +14 −0 temporalio/api/sdk/v1/__init__.py
  157. +112 −0 temporalio/api/sdk/v1/enhanced_stack_trace_pb2.py
  158. +225 −0 temporalio/api/sdk/v1/enhanced_stack_trace_pb2.pyi
  159. +2 −1 temporalio/api/sdk/v1/task_complete_metadata_pb2.py
  160. +3 −22 temporalio/api/sdk/v1/task_complete_metadata_pb2.pyi
  161. +43 −0 temporalio/api/sdk/v1/user_metadata_pb2.py
  162. +60 −0 temporalio/api/sdk/v1/user_metadata_pb2.pyi
  163. +10 −9 temporalio/api/sdk/v1/workflow_metadata_pb2.py
  164. +20 −36 temporalio/api/sdk/v1/workflow_metadata_pb2.pyi
  165. +22 −0 temporalio/api/taskqueue/v1/__init__.py
  166. +226 −31 temporalio/api/taskqueue/v1/message_pb2.py
  167. +571 −22 temporalio/api/taskqueue/v1/message_pb2.pyi
  168. +9 −8 temporalio/api/testservice/v1/request_response_pb2.py
  169. +3 −1 temporalio/api/testservice/v1/request_response_pb2.pyi
  170. +1 −0 temporalio/api/testservice/v1/request_response_pb2_grpc.py
  171. +1 −0 temporalio/api/testservice/v1/service_pb2.py
  172. +1 −0 temporalio/api/testservice/v1/service_pb2.pyi
  173. +1 −0 temporalio/api/testservice/v1/service_pb2_grpc.py
  174. +3 −0 temporalio/api/testservice/v1/service_pb2_grpc.pyi
  175. +10 −9 temporalio/api/update/v1/message_pb2.py
  176. +22 −43 temporalio/api/update/v1/message_pb2.pyi
  177. +4 −3 temporalio/api/version/v1/message_pb2.py
  178. +4 −22 temporalio/api/version/v1/message_pb2.pyi
  179. +24 −0 temporalio/api/workflow/v1/__init__.py
  180. +417 −25 temporalio/api/workflow/v1/message_pb2.py
  181. +1,515 −26 temporalio/api/workflow/v1/message_pb2.pyi
  182. +120 −0 temporalio/api/workflowservice/v1/__init__.py
  183. +1,667 −372 temporalio/api/workflowservice/v1/request_response_pb2.py
  184. +3,716 −161 temporalio/api/workflowservice/v1/request_response_pb2.pyi
  185. +1 −0 temporalio/api/workflowservice/v1/request_response_pb2_grpc.py
  186. +0 −21 temporalio/api/workflowservice/v1/request_response_pb2_grpc.pyi
  187. +156 −65 temporalio/api/workflowservice/v1/service_pb2.py
  188. +1 −21 temporalio/api/workflowservice/v1/service_pb2.pyi
  189. +1,568 −40 temporalio/api/workflowservice/v1/service_pb2_grpc.py
  190. +773 −161 temporalio/api/workflowservice/v1/service_pb2_grpc.pyi
  191. +1,464 −1,012 temporalio/bridge/Cargo.lock
  192. +15 −7 temporalio/bridge/Cargo.toml
  193. +2 −0 temporalio/bridge/client.py
  194. +12 −1 temporalio/bridge/proto/__init__.py
  195. +12 −9 temporalio/bridge/proto/activity_result/activity_result_pb2.py
  196. +4 −1 temporalio/bridge/proto/activity_result/activity_result_pb2.pyi
  197. +8 −1 temporalio/bridge/proto/activity_task/__init__.py
  198. +34 −13 temporalio/bridge/proto/activity_task/activity_task_pb2.py
  199. +80 −3 temporalio/bridge/proto/activity_task/activity_task_pb2.pyi
  200. +39 −38 temporalio/bridge/proto/bridge/bridge_pb2.py
  201. +7 −8 temporalio/bridge/proto/bridge/bridge_pb2.pyi
  202. +9 −6 temporalio/bridge/proto/child_workflow/child_workflow_pb2.py
  203. +17 −6 temporalio/bridge/proto/child_workflow/child_workflow_pb2.pyi
  204. +6 −1 temporalio/bridge/proto/common/__init__.py
  205. +22 −5 temporalio/bridge/proto/common/common_pb2.py
  206. +26 −2 temporalio/bridge/proto/common/common_pb2.pyi
  207. +63 −4 temporalio/bridge/proto/core_interface_pb2.py
  208. +89 −4 temporalio/bridge/proto/core_interface_pb2.pyi
  209. +1 −0 temporalio/bridge/proto/core_interface_pb2_grpc.py
  210. +7 −4 temporalio/bridge/proto/external_data/external_data_pb2.py
  211. +3 −1 temporalio/bridge/proto/external_data/external_data_pb2.pyi
  212. +3 −2 temporalio/bridge/proto/health/v1/health_pb2.py
  213. +4 −2 temporalio/bridge/proto/health/v1/health_pb2.pyi
  214. +15 −0 temporalio/bridge/proto/nexus/__init__.py
  215. +107 −0 temporalio/bridge/proto/nexus/nexus_pb2.py
  216. +254 −0 temporalio/bridge/proto/nexus/nexus_pb2.pyi
  217. +6 −2 temporalio/bridge/proto/workflow_activation/__init__.py
  218. +122 −85 temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.py
  219. +241 −46 temporalio/bridge/proto/workflow_activation/workflow_activation_pb2.pyi
  220. +4 −0 temporalio/bridge/proto/workflow_commands/__init__.py
  221. +151 −100 temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.py
  222. +206 −28 temporalio/bridge/proto/workflow_commands/workflow_commands_pb2.pyi
  223. +15 −11 temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.py
  224. +20 −3 temporalio/bridge/proto/workflow_completion/workflow_completion_pb2.pyi
  225. +2 −0 temporalio/bridge/runtime.py
  226. +1 −1 temporalio/bridge/sdk-core
  227. +171 −8 temporalio/bridge/src/client.rs
  228. +14 −7 temporalio/bridge/src/lib.rs
  229. +8 −8 temporalio/bridge/src/metric.rs
  230. +24 −18 temporalio/bridge/src/runtime.rs
  231. +6 −0 temporalio/bridge/src/testing.rs
  232. +637 −73 temporalio/bridge/src/worker.rs
  233. +2 −0 temporalio/bridge/testing.py
  234. +123 −18 temporalio/bridge/worker.py
  235. +1,580 −314 temporalio/client.py
  236. +194 −8 temporalio/common.py
  237. +29 −18 temporalio/contrib/opentelemetry.py
  238. +114 −0 temporalio/contrib/pydantic.py
  239. +67 −30 temporalio/converter.py
  240. +32 −0 temporalio/exceptions.py
  241. +13 −15 temporalio/runtime.py
  242. +479 −7 temporalio/service.py
  243. +1 −0 temporalio/testing/_activity.py
  244. +25 −0 temporalio/testing/_workflow.py
  245. +45 −1 temporalio/worker/__init__.py
  246. +214 −180 temporalio/worker/_activity.py
  247. +8 −3 temporalio/worker/_interceptor.py
  248. +35 −11 temporalio/worker/_replayer.py
  249. +447 −0 temporalio/worker/_tuning.py
  250. +227 −34 temporalio/worker/_worker.py
  251. +346 −77 temporalio/worker/_workflow.py
  252. +626 −128 temporalio/worker/_workflow_instance.py
  253. +0 −1 temporalio/worker/workflow_sandbox/__init__.py
  254. +3 −2 temporalio/worker/workflow_sandbox/_importer.py
  255. +217 −49 temporalio/worker/workflow_sandbox/_restrictions.py
  256. +13 −2 temporalio/worker/workflow_sandbox/_runner.py
  257. +982 −354 temporalio/workflow.py
  258. +2 −0 tests/__init__.py
  259. +65 −34 tests/conftest.py
  260. +36 −0 tests/contrib/pydantic/activities.py
  261. +426 −0 tests/contrib/pydantic/models.py
  262. +250 −0 tests/contrib/pydantic/models_2.py
  263. +380 −0 tests/contrib/pydantic/test_pydantic.py
  264. +175 −0 tests/contrib/pydantic/workflows.py
  265. +55 −1 tests/contrib/test_opentelemetry.py
  266. +117 −12 tests/helpers/__init__.py
  267. +18 −0 tests/helpers/external_coroutine.py
  268. +60 −0 tests/helpers/external_stack_trace.py
  269. +4 −4 tests/helpers/worker.py
  270. +301 −82 tests/test_client.py
  271. +8 −0 tests/test_common.py
  272. +30 −18 tests/test_converter.py
  273. +74 −1 tests/test_runtime.py
  274. +10 −1 tests/test_service.py
  275. +141 −16 tests/test_workflow.py
  276. +82 −4 tests/testing/test_workflow.py
  277. +35 −7 tests/worker/test_activity.py
  278. +46 −2 tests/worker/test_interceptor.py
  279. +217 −16 tests/worker/test_replayer.py
  280. +113 −0 tests/worker/test_replayer_command_reordering_backward_compatibility.json
  281. +469 −0 tests/worker/test_replayer_event_tracing.json
  282. +265 −0 tests/worker/test_replayer_event_tracing_alternate.json
  283. +419 −0 tests/worker/test_replayer_event_tracing_double_sig_at_start.json
  284. +861 −0 tests/worker/test_update_with_start.py
  285. +912 −6 tests/worker/test_worker.py
  286. +3,228 −177 tests/worker/test_workflow.py
  287. +17 −3 tests/worker/workflow_sandbox/test_importer.py
  288. +41 −1 tests/worker/workflow_sandbox/test_restrictions.py
  289. +47 −20 tests/worker/workflow_sandbox/test_runner.py
  290. +2 −1 tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.py
  291. +3 −1 tests/worker/workflow_sandbox/testmodules/proto/proto_message_pb2.pyi
  292. +1,570 −0 uv.lock
63 changes: 30 additions & 33 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
@@ -9,71 +9,68 @@ jobs:
# Compile the binaries and upload artifacts
compile-binaries:
strategy:
fail-fast: true
fail-fast: false
matrix:
include:
- os: ubuntu-latest
package-suffix: linux-amd64
- os: ubuntu-arm
package-suffix: linux-aarch64
# Need the 8 CPU version that has 12GB of RAM, the 4 CPU version
# only has 6 GB.
runsOn: buildjet-8vcpu-ubuntu-2204-arm
runsOn: ubuntu-24.04-arm64-2-core
- os: macos-intel
package-suffix: macos-amd64
runsOn: macos-12
runsOn: macos-13
- os: macos-arm
package-suffix: macos-aarch64
runsOn: macos-14
- os: windows-latest
package-suffix: windows-amd64
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
# actions/setup-python doesn't yet support Linux ARM
- if: ${{ matrix.os != 'ubuntu-arm' }}
uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- if: ${{ matrix.os == 'ubuntu-arm' }}
uses: deadsnakes/action@v2.1.1
with:
python-version: "3.12"
python-version: "3.13"

# Install Rust locally for non-Linux (Linux uses an internal docker
# command to build with cibuildwheel which uses rustup install defined
# in pyproject.toml)
- if: ${{ runner.os != 'Linux' }}
uses: actions-rs/toolchain@v1
with:
toolchain: stable
uses: dtolnay/rust-toolchain@stable
- if: ${{ runner.os != 'Linux' }}
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
working-directory: temporalio/bridge

# Prepare
# Using fixed Poetry version until
# https://github.com/python-poetry/poetry/issues/7611 and
# https://github.com/python-poetry/poetry/pull/7694 are fixed
- run: python -m pip install --upgrade wheel "poetry==1.3.2" poethepoet
- run: poetry install --no-root --all-extras
workspaces: temporalio/bridge -> target
- uses: astral-sh/setup-uv@v5
- run: uv sync --all-extras

# Add the source dist only for Linux x64 for now
- if: ${{ matrix.package-suffix == 'linux-amd64' }}
run: poetry build --format sdist
run: uv build --sdist

# Build and fix the wheel
- run: poetry run cibuildwheel --output-dir dist
- run: poe fix-wheel
# Build the wheel
- run: uv run cibuildwheel --output-dir dist

# Simple test
- run: poe test-dist-single
# Install the wheel in a new venv and run a test
- name: Test wheel
shell: bash
run: |
mkdir __test_wheel__
cd __test_wheel__
cp -r ../tests .
python -m venv .venv
bindir=bin
if [ "$RUNNER_OS" = "Windows" ]; then
bindir=Scripts
fi
./.venv/$bindir/pip install 'protobuf>=3.20,<6' 'types-protobuf>=3.20,<6' 'typing-extensions>=4.2.0,<5' pytest pytest_asyncio grpcio pydantic opentelemetry-api opentelemetry-sdk python-dateutil
./.venv/$bindir/pip install --no-index --find-links=../dist temporalio
./.venv/$bindir/python -m pytest -s -k test_workflow_hello
# Upload dist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.package-suffix }}
path: dist
107 changes: 67 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -9,62 +9,84 @@ on:
jobs:
# Build and test the project
build-lint-test:
timeout-minutes: 30
strategy:
fail-fast: true
fail-fast: false
matrix:
python: ["3.8", "3.12"]
python: ["3.9", "3.13"]
os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-arm, windows-latest]
include:
# On 3.9 there is a problem with import errors caused by pytests' loader that surface due
# to a bug in CPython (https://github.com/python/cpython/issues/91351), so we avoid using
# the assert rewriter.
- python: "3.9"
pytestExtraArgs: "--assert=plain"
- os: ubuntu-latest
python: "3.12"
python: "3.13"
docsTarget: true
cloudTestTarget: true
clippyLinter: true
- os: ubuntu-latest
python: "3.8"
python: "3.9"
protoCheckTarget: true
- os: ubuntu-arm
runsOn: buildjet-4vcpu-ubuntu-2204-arm
runsOn: ubuntu-24.04-arm64-2-core
- os: macos-intel
runsOn: macos-12
- os: macos-arm
runsOn: macos-14
# macOS ARM 3.8 does not have an available Python build at
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json.
# See https://github.com/actions/setup-python/issues/808 and
# https://github.com/actions/python-versions/pull/259.
exclude:
runsOn: macos-13
# On 3.13.3 there is some issue with macOS intel where it hangs after pytest with some
# test that may have a worker that cannot properly shutdown, but it does not occur on
# other versions, platforms, etc. See https://github.com/temporalio/sdk-python/issues/834.
- os: macos-intel
python: "3.13"
pythonOverride: "3.13.2"
- os: macos-arm
python: "3.8"
runsOn: macos-latest
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
working-directory: temporalio/bridge
# actions/setup-python doesn't yet support Linux ARM
- if: ${{ matrix.os != 'ubuntu-arm' }}
uses: actions/setup-python@v4
workspaces: temporalio/bridge -> target
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- if: ${{ matrix.os == 'ubuntu-arm' }}
uses: deadsnakes/action@v2.1.1
python-version: ${{ matrix.pythonOverride || matrix.python }}
- uses: arduino/setup-protoc@v3
with:
python-version: ${{ matrix.python }}
# Using fixed Poetry version until
# https://github.com/python-poetry/poetry/issues/7611 and
# https://github.com/python-poetry/poetry/pull/7694 are fixed
- run: python -m pip install --upgrade wheel "poetry==1.3.2" poethepoet
- run: poetry install --no-root --all-extras
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: astral-sh/setup-uv@v5
- run: uv tool install poethepoet
- run: uv sync --all-extras
- run: poe bridge-lint
if: ${{ matrix.clippyLinter }}
- run: poe lint
- run: poe build-develop
- run: poe test -s -o log_cli_level=DEBUG
- run: mkdir junit-xml
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
timeout-minutes: 10
# Time skipping doesn't yet support ARM
- if: ${{ !endsWith(matrix.os, '-arm') }}
run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping
run: poe test ${{matrix.pytestExtraArgs}} -s --workflow-environment time-skipping --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--time-skipping.xml
timeout-minutes: 10
# Check cloud if proper target and not on fork
- if: ${{ matrix.cloudTestTarget && (github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-python') }}
run: poe test ${{matrix.pytestExtraArgs}} -s -k test_cloud_client --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}--cloud.xml
timeout-minutes: 10
env:
TEMPORAL_CLIENT_CLOUD_API_KEY: ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
TEMPORAL_CLIENT_CLOUD_API_VERSION: 2024-05-13-00
TEMPORAL_CLIENT_CLOUD_NAMESPACE: sdk-ci.a2dd6
- name: "Upload junit-xml artifacts"
uses: actions/upload-artifact@v4
if: always()
with:
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{ matrix.python }}--${{ matrix.os }}
path: junit-xml
retention-days: 14

# Confirm protos are already generated properly with older protobuf
# library and run test with that older version. We must downgrade protobuf
@@ -76,22 +98,28 @@ jobs:
env:
TEMPORAL_TEST_PROTO3: 1
run: |
poetry add "protobuf<4"
uv add --python 3.9 "protobuf<4"
uv sync --all-extras
poe build-develop
poe gen-protos
poe format
[[ -z $(git status --porcelain temporalio) ]] || (git diff; echo "Protos changed"; exit 1)
poe test -s -o log_cli_level=DEBUG
[[ -z $(git status --porcelain temporalio) ]] || (git diff temporalio; echo "Protos changed"; exit 1)
poe test -s
timeout-minutes: 10

# Do docs stuff (only on one host)
- name: Build API docs
if: ${{ matrix.docsTarget }}
run: poe gen-docs
- name: Deploy prod API docs
if: ${{ github.ref == 'refs/heads/main' && matrix.docsTarget }}
run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --name python --scope temporal --prod --yes
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: npx vercel deploy build/apidocs -t ${{ secrets.VERCEL_TOKEN }} --prod --yes

# Confirm README ToC is generated properly
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
- name: Check generated README ToC
if: ${{ matrix.docsTarget }}
run: |
@@ -105,4 +133,3 @@ jobs:
python-repo-path: ${{github.event.pull_request.head.repo.full_name}}
version: ${{github.event.pull_request.head.ref}}
version-is-repo-ref: true
features-repo-ref: http-connect-proxy-python
18 changes: 18 additions & 0 deletions .github/workflows/omes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Omes Testing
on:
push:
branches:
- main
- "releases/*"

jobs:
omes-image-build:
uses: temporalio/omes/.github/workflows/docker-images.yml@main
secrets: inherit
with:
lang: python
sdk-repo-url: ${{ github.event.pull_request.head.repo.full_name || 'temporalio/sdk-python' }}
sdk-repo-ref: ${{ github.event.pull_request.head.ref || github.ref }}
# TODO: Remove once we have a good way of cleaning up sha-based pushed images
docker-tag-ext: ci-latest
do-push: true
24 changes: 15 additions & 9 deletions .github/workflows/run-bench.yml
Original file line number Diff line number Diff line change
@@ -26,22 +26,28 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
# Prepare
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
working-directory: temporalio/bridge
- uses: actions/setup-python@v4
workspaces: temporalio/bridge -> target
- uses: actions/setup-python@v5
with:
python-version: "3.12"

python-version: "3.13"
- uses: arduino/setup-protoc@v3
with:
# TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: astral-sh/setup-uv@v5
# Build
- run: python -m pip install --upgrade wheel poetry poethepoet
- run: poetry install --no-root --all-extras
- run: uv tool install poethepoet
- run: uv sync --all-extras
- run: poe build-develop-with-release

# Run a bunch of bench tests. We run multiple times since results vary.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -7,3 +7,5 @@ temporalio/bridge/temporal_sdk_bridge*
/tests/helpers/golangserver/golangserver
/tests/helpers/golangworker/golangworker
/.idea
/sdk-python.iml
/.zed
Loading