bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)

This commit is contained in:
Andrew Svetlov 2019-09-12 15:40:40 +03:00 committed by GitHub
parent 3ab61473ba
commit a488879cba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 178 additions and 101 deletions

View file

@ -855,9 +855,10 @@ os.close(fd)
watcher.attach_loop(self.loop)
try:
asyncio.set_child_watcher(watcher)
create = asyncio.create_subprocess_exec(*args,
pass_fds={wfd},
loop=self.loop)
create = asyncio.create_subprocess_exec(
*args,
pass_fds={wfd},
)
proc = self.loop.run_until_complete(create)
self.loop.run_until_complete(proc.wait())
finally: