Skip to content

Releases: temporalio/sdk-python

0.1b2

20 Sep 15:10
49ccd56
Compare
Choose a tag to compare

⚠️ THIS IS A BETA RELEASE AND COMPATIBILITY MAY NOT BE MAINTAINED

Get from PyPI

Highlights

Test Framework

temporalio.testing package now includes an ActivityEnvironment for mocking heartbeating and cancellation for activity code. See https://github.com/temporalio/sdk-python#testing-1 for more details.

temporalio.testing package also now includes a WorkflowEnvironment for testing workflows. The WorkFlowEnvironment can be started in time-skipping mode which, by default, will automatically forward time to the next event when a workflow's result is waited on. For a full, local Temporal server or a time-skipping server, APIs are included that automatically download the binaries needed to run. See https://github.com/temporalio/sdk-python#testing for more details.

Replayer

The temporalio.worker package now has a Replayer which, given workflows and a history, can replay an entire workflow run locally. This is very useful for debugging and confirming code-change safety. See https://github.com/temporalio/sdk-python#workflow-replay for more details.

Advanced Type Hinting Support

Nested dataclasses, Pydantic classes, optionals, unions, collections, etc are now supported for deserialization if the workflow/activity param/return types are properly type hinted. See https://github.com/temporalio/sdk-python#data-conversion for more details.

Client Updates

  • gRPC is now an optional dependency
  • Client.workflow_service and Client.operator_service are now available for direct API calls to Temporal
  • Added Client.service_client which, in addition to having access to the two services from the previous bullet, also has a check_health call to perform gRPC health check
  • rpc_metadata can be now added at the client level and/or to every API call which will set API headers (useful for proxies and other things)
  • rpc_timeout can now be added to every API call to set a timeout on the call itself
  • Added lazy parameter to Client.connect which avoids eager connection (cannot use these for workers)

Breaking Changes

Most breaking changes were very minor:

  • Client.service is now Client.workflow_service
  • static_headers parameter in Client.connect is now rpc_metadata
  • Most things that accepted an Iterable were changed to accept a Sequence
  • interceptors parameter in Client.connect no longer accepts callables, just the Interceptor instances it always had
  • max_concurrent_wft_polls and max_concurrent_at_polls parameters in Client.connect were changed to max_concurrent_workflow_task_polls and max_concurrent_activity_task_polls respectively

Specific Changes

2022-08-05 - 043cdf3 - Minor README update (#99)
2022-08-10 - 8171049 - Fix activity class type hinting when not instantiated (#104)
2022-08-12 - efc1c7b - Advanced type hinting support (#102)
2022-08-16 - c965c47 - gRPC Service Improvements (#106)
2022-08-19 - 5b202c0 - Replayer (#108)
2022-08-25 - 4db14cc - README: Fix import name in quickstart (#112)
2022-09-01 - 07da1b9 - Test Framework (#121)
2022-09-07 - 1c9a59e - Several minor issues (#127)
2022-09-16 - 5b0e1c8 - Update and dogfood test framework (#132)
2022-09-19 - 580b6fc - Skip conditions during patch and query jobs (#137)
2022-09-19 - bcc0132 - Update protobuf (#136)

0.1b1

05 Aug 17:36
8fabf32
Compare
Choose a tag to compare

⚠️ THIS IS A BETA RELEASE AND COMPATIBILITY MAY NOT BE MAINTAINED

Get from PyPI

Highlights

Updates

  • Instead of http://host:port, the target endpoint is now host:port to align with other SDKs (warns if scheme is present, will be an error next version).
  • Support for activities as methods on instances instead of just top-level functions. Using an instance with, say a DB client as an instance property, is a good way to have it accessible from inside the activity. The @activity.defn decorator can be set on the method, and helpers like workflow.execute_activity_method are present to help typing/invocation.
  • Support for activities as instances of classes with __call__ implemented. The @activity.defn decorator can be set on the class in that case, and helpers like workflow.execute_activity_class are present to help typing/invocation.
  • Added many more fields to client.WorkflowExecutionDescription
  • Several bug fixes

OpenTelemetry

An OpenTelemetry interceptor can now be provided that traces workflows and activities. Due to Temporal's replay capabilities where a workflow may start in one place and finish in another at a completely different time, the workflow tracing spans do not have durations, but they properly and deterministically represent the things done by a workflow. They are hierarchical and pass across servers so if, for example, an activity made an HTTP call, the HTTP span would appear in the activity span that would appear in the workflow span. See the README for more information.

Specific Changes

2022-06-15 - 431ca19 - macOS M1 Python 3.10+ gRPC README note (#51)
2022-06-15 - 6ac791f - Fix CI Rust cache working directory (#50)
2022-06-27 - 25caaf0 - Remove macOS-ARM support from missing features list (#53)
2022-07-01 - 0392468 - Use cibuildwheel and update grpcio (#57)
2022-07-13 - 7456f44 - Remove activity info retry policy (#65)
2022-07-13 - a47f573 - Add proper version to client (#67)
2022-07-13 - a5c455b - Support IntEnum in converter (#74)
2022-07-13 - d91593d - Add get_current_history_length() to workflow info (#73)
2022-07-14 - 232446a - Additional high-level describe details (#72)
2022-07-14 - 5926b76 - Minor exception-related updates (#75)
2022-07-14 - a079a5e - Improves typing of SearchAttributes (#76)
2022-07-14 - b8a80e0 - Type refactoring and activity class/method support (#69)
2022-07-14 - e5bd9a9 - Properly handle uncaught child/activity cancel during workflow cancel (#71)
2022-07-21 - a569582 - Many changes including OpenTelemetry support (#77)
2022-08-01 - 2288f41 - Use host:port instead of URL and TLS test fixes (#86)
2022-08-01 - dae22ac - Fix wait_condition timeout issue (#90)
2022-08-04 - f560680 - Fix cancel before run (#94)

0.1a2

13 Jun 17:42
933c373
Compare
Choose a tag to compare

⚠️ THIS IS AN ALPHA RELEASE AND COMPATIBILITY WILL NOT BE MAINTAINED

Highlights

Workflows

This release includes full Temporal workflow support.

Activity Definitions

Activities are now marked with @activity.defn and name can be overridden there instead of needing to provide a dict to the worker.

macOS M1 Support

macOS ARM-based packages are now uploaded to PyPI.

Specific Changes

2022-03-18 - c1efe42 - Readme updates (#13)
2022-03-22 - fc528ee - Move to proper async heartbeat queuing (#14)
2022-03-23 - 256bc4a - Worker package refactor (#15)
2022-03-28 - 23aa7ae - @activity.defn support and other minor things (#16)
2022-05-27 - f1aa1c9 - Workflow implementation (#21)
2022-06-01 - 4657453 - Async activity support and describe interceptor (#32)
2022-06-01 - 47be211 - Update SDK Core and PyO3 (#31)
2022-06-03 - 39eb19d - Add API doc publishing step (#38)
2022-06-03 - 962a5e8 - Patch support and random/UUID helpers (#35)
2022-06-03 - a8e842b - Move to pydoctor for API docs (#34)
2022-06-09 - 0f134e2 - Add generated protos (#42)
2022-06-09 - 81e17c0 - More tests, docs, and minor things (#41)
2022-06-10 - 155afe2 - Dependency updates, Core proto updates, and other minor things (#46)
2022-06-10 - 2d4405e - Clarify README (#44)
2022-06-10 - 8ffa58e - Search attributes (#43)

0.1a1

18 Mar 13:20
641efe8
Compare
Choose a tag to compare

⚠️ THIS IS AN ALPHA RELEASE AND COMPATIBILITY WILL NOT BE MAINTAINED

Highlights

Initial release!

This release includes:

  • Temporal client capable of doing most Temporal things
  • Activity-only workers for running Python activities from workflows in another SDK language
  • Support for Windows x64, macOS x64, and Linux x64 (glibc >= 2.31)

This release does not include:

  • Workflow worker support
  • Async activity support (in client or worker)
  • Support for Windows arm, macOS arm (i.e. M1), Linux arm, and Linux x64 glibc < 2.31.

See the README or https://github.com/temporalio/samples-python for more

Specific Changes

2022-01-31 - a3d5328 - Rework grpc locations and add some different structure (#3)
2022-02-04 - 7b5a69c - Converters and scaffolding (#4)
2022-02-16 - 2afda4e - Client impl and docs scaffolding (#6)
2022-03-14 - 3e1e408 - Activity support (#7)
2022-03-17 - 641efe8 - Packaging, heartbeat logic, dependency updates, and other errata (#8)