mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Fix more deprecation warnings for 3.8
This commit is contained in:
parent
f554819506
commit
c62b6c3e88
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user