Skip to content

Commit

Permalink
setattr _is_coroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
devhawk committed Jan 31, 2025
1 parent 467efe8 commit 30fa2e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbos/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ def start_workflow(
return WorkflowHandleFuture(new_wf_id, future, dbos)

if sys.version_info <= (3, 11):
from asyncio.coroutines import _is_coroutine
def mark_coroutine(func: Callable[P, R]) -> Callable[P, R]:
setattr(func, '_is_coroutine', _is_coroutine)
return func
else:
def mark_coroutine(func: Callable[P, R]) -> Callable[P, R]:
Expand Down

0 comments on commit 30fa2e7

Please sign in to comment.