0.1b2
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_serviceandClient.operator_serviceare now available for direct API calls to Temporal- Added
Client.service_clientwhich, in addition to having access to the two services from the previous bullet, also has acheck_healthcall to perform gRPC health check rpc_metadatacan 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_timeoutcan now be added to every API call to set a timeout on the call itself- Added
lazyparameter toClient.connectwhich avoids eager connection (cannot use these for workers)
Breaking Changes
Most breaking changes were very minor:
Client.serviceis nowClient.workflow_servicestatic_headersparameter inClient.connectis nowrpc_metadata- Most things that accepted an
Iterablewere changed to accept aSequence interceptorsparameter inClient.connectno longer accepts callables, just theInterceptorinstances it always hadmax_concurrent_wft_pollsandmax_concurrent_at_pollsparameters inClient.connectwere changed tomax_concurrent_workflow_task_pollsandmax_concurrent_activity_task_pollsrespectively
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)