PrefectHQ
prefect
BlogDocsChangelog

Add `arun_deployment` and replace `@sync_compatible` with `@async_dispatch`

#20160
Comparing
add-arun-deployment-async-dispatch
(
86f3a7c
) with
main
(
06750f7
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s
bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
606 µs606.7 µs

Ignored

bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+1%
172.3 ms170.4 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+6%
5.7 ms5.3 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+6%
33.6 ms31.7 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-2%
9.7 ms9.9 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-1%
107 ms107.6 ms

Commits

Click on a commit to change the comparison range
Base
main
06750f7
-0.05%
Add arun_deployment and replace sync_compatible with async_dispatch This change follows the intent of issue #15008 to replace implicit sync/async conversion with explicit, type-safe alternatives. Changes: - Add `arun_deployment` as an explicit async function for running deployments - Replace `@sync_compatible` with `@async_dispatch` on `run_deployment` - `run_deployment` now dispatches to `arun_deployment` in async context - Sync context uses `SyncPrefectClient` directly (no event loop magic) - Export `arun_deployment` from `prefect.deployments` - Add comprehensive tests for both sync and async behavior The `run_deployment.aio` attribute is preserved for backward compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
59b731d
23 hours ago
by desertaxle
-0.01%
Merge branch 'main' into add-arun-deployment-async-dispatch
86f3a7c
22 hours ago
by desertaxle
© 2026 CodSpeed Technology
Home Terms Privacy Docs