From c62b6c3e8815cec6f73ec20aa4d0ebd9b68a0f14 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 26 Nov 2019 05:19:11 -0500 Subject: [PATCH] Fix more deprecation warnings for 3.8 --- discord/client.py | 2 +- discord/gateway.py | 2 +- docs/ext/tasks/index.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/client.py b/discord/client.py index 67f6fd839..deabe39b5 100644 --- a/discord/client.py +++ b/discord/client.py @@ -74,7 +74,7 @@ def _cancel_tasks(loop): for task in tasks: task.cancel() - loop.run_until_complete(asyncio.gather(*tasks, loop=loop, return_exceptions=True)) + loop.run_until_complete(asyncio.gather(*tasks, return_exceptions=True)) log.info('All tasks finished cancelling.') for task in tasks: diff --git a/discord/gateway.py b/discord/gateway.py index f2dc7fcbb..21f4fc66c 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -744,7 +744,7 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol): async def poll_event(self): try: - msg = await asyncio.wait_for(self.recv(), timeout=30.0, loop=self.loop) + msg = await asyncio.wait_for(self.recv(), timeout=30.0) await self.received_message(json.loads(msg)) except websockets.exceptions.ConnectionClosed as exc: raise ConnectionClosed(exc, shard_id=None) from exc diff --git a/docs/ext/tasks/index.rst b/docs/ext/tasks/index.rst index 206a7beba..bc97d0ac1 100644 --- a/docs/ext/tasks/index.rst +++ b/docs/ext/tasks/index.rst @@ -110,7 +110,7 @@ Doing something during cancellation: def __init__(self, bot): self.bot= bot self._batch = [] - self.lock = asyncio.Lock(loop=bot.loop) + self.lock = asyncio.Lock() self.bulker.start() async def do_bulk(self):