mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)
(cherry picked from commit a488879cba
)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
This commit is contained in:
parent
535863e3f5
commit
345bfc990f
7 changed files with 178 additions and 101 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue