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_service
andClient.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 acheck_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 toClient.connect
which avoids eager connection (cannot use these for workers)
Breaking Changes
Most breaking changes were very minor:
Client.service
is nowClient.workflow_service
static_headers
parameter inClient.connect
is nowrpc_metadata
- Most things that accepted an
Iterable
were changed to accept aSequence
interceptors
parameter inClient.connect
no longer accepts callables, just theInterceptor
instances it always hadmax_concurrent_wft_polls
andmax_concurrent_at_polls
parameters inClient.connect
were changed tomax_concurrent_workflow_task_polls
andmax_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)