Avoid explicitly passing the loop to asyncio

This behaviour is deprecated and will be removed in future versions
of Python. Technically, it could be considered a bug (invalid usage
causing different behaviour from the expected one), and in practice
it should not break much code (because .get_event_loop() would likely
be the same event loop anyway).
This commit is contained in:
Lonami Exo
2020-07-25 18:39:35 +02:00
parent de17a19168
commit 1c3e7dda01
15 changed files with 65 additions and 73 deletions

View File

@@ -445,8 +445,7 @@ class Conversation(ChatGetter):
# cleared when their futures are set to a result.
return asyncio.wait_for(
future,
timeout=None if due == float('inf') else due - time.time(),
loop=self._client.loop
timeout=None if due == float('inf') else due - time.time()
)
def _cancel_all(self, exception=None):