Fix more deprecation warnings for 3.8
This commit is contained in:
		@@ -74,7 +74,7 @@ def _cancel_tasks(loop):
 | 
				
			|||||||
    for task in tasks:
 | 
					    for task in tasks:
 | 
				
			||||||
        task.cancel()
 | 
					        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.')
 | 
					    log.info('All tasks finished cancelling.')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for task in tasks:
 | 
					    for task in tasks:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -744,7 +744,7 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    async def poll_event(self):
 | 
					    async def poll_event(self):
 | 
				
			||||||
        try:
 | 
					        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))
 | 
					            await self.received_message(json.loads(msg))
 | 
				
			||||||
        except websockets.exceptions.ConnectionClosed as exc:
 | 
					        except websockets.exceptions.ConnectionClosed as exc:
 | 
				
			||||||
            raise ConnectionClosed(exc, shard_id=None) from exc
 | 
					            raise ConnectionClosed(exc, shard_id=None) from exc
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -110,7 +110,7 @@ Doing something during cancellation:
 | 
				
			|||||||
        def __init__(self, bot):
 | 
					        def __init__(self, bot):
 | 
				
			||||||
            self.bot= bot
 | 
					            self.bot= bot
 | 
				
			||||||
            self._batch = []
 | 
					            self._batch = []
 | 
				
			||||||
            self.lock = asyncio.Lock(loop=bot.loop)
 | 
					            self.lock = asyncio.Lock()
 | 
				
			||||||
            self.bulker.start()
 | 
					            self.bulker.start()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        async def do_bulk(self):
 | 
					        async def do_bulk(self):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user