bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess (GH-23521)

This commit is contained in:
Yurii Karabas 2020-11-28 10:21:17 +02:00 committed by GitHub
parent f9195318a8
commit e4fe303b8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 158 deletions

View file

@ -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