Skip to content

Commit a592a9c

Browse files
committed
use python3.7+ asyncio.create_task for async
1 parent e2827ef commit a592a9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exec_helpers/async_api/subprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ async def poll_stderr() -> None:
188188

189189
result = exec_result.ExecResult(cmd=cmd_for_log, stdin=stdin, started=async_result.started)
190190

191-
stdout_task: "asyncio.Future[None]" = asyncio.ensure_future(poll_stdout())
192-
stderr_task: "asyncio.Future[None]" = asyncio.ensure_future(poll_stderr())
191+
stdout_task: "asyncio.Task[None]" = asyncio.create_task(poll_stdout())
192+
stderr_task: "asyncio.Task[None]" = asyncio.create_task(poll_stderr())
193193

194194
try:
195195
# Wait real timeout here

0 commit comments

Comments
 (0)