From fa3e690154a8dbfb864979396d1b4c6e3ede69d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 19 Oct 2022 21:40:03 +0200 Subject: [PATCH] Use asyncio.create_task to fix asyncio.wait deprecation notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- ChangeLog | 4 ++++ slixmpp_omemo/__init__.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b04851a..a1bcbe3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Version xxx: +2022-xx-xx Maxime “pep” Buquet + * Added: + - Coroutines in asyncio.wait is now deprecated. Added create_task calls Version 0.8.0: 2022-08-23 Maxime “pep” Buquet * Breaking: diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index bed6c83..bca8094 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -290,8 +290,8 @@ class XEP_0384(BasePlugin): if self.backend_loaded: self.xmpp['xep_0163'].add_interest(OMEMO_DEVICES_NS) await asyncio.wait([ - self._set_device_list(), - self._publish_bundle(), + asyncio.create_task(self._set_device_list()), + asyncio.create_task(self._publish_bundle()), ]) self._initial_publish_done = True