mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess (GH-23521)
This commit is contained in:
parent
f9195318a8
commit
e4fe303b8c
9 changed files with 66 additions and 158 deletions
|
@ -635,26 +635,6 @@ class SubprocessMixin:
|
|||
|
||||
self.assertIsNone(self.loop.run_until_complete(execute()))
|
||||
|
||||
def test_exec_loop_deprecated(self):
|
||||
async def go():
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
proc = await asyncio.create_subprocess_exec(
|
||||
sys.executable, '-c', 'pass',
|
||||
loop=self.loop,
|
||||
)
|
||||
await proc.wait()
|
||||
self.loop.run_until_complete(go())
|
||||
|
||||
def test_shell_loop_deprecated(self):
|
||||
async def go():
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
proc = await asyncio.create_subprocess_shell(
|
||||
"exit 0",
|
||||
loop=self.loop,
|
||||
)
|
||||
await proc.wait()
|
||||
self.loop.run_until_complete(go())
|
||||
|
||||
|
||||
if sys.platform != 'win32':
|
||||
# Unix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue