From 79bbbdb3e633152cc95e77a550f2eb2cde4e6784 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 18 Nov 2021 15:23:46 +0100 Subject: Replace asyncio.ensure_future() with asyncio.create_task() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The latter function got introduced in Python 3.7, which is conveniently our MSPV, so let’s use that. --- poezio/core/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'poezio/core/handlers.py') diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index d4625b4b..bdb91475 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -108,7 +108,7 @@ class HandlerCore: await self.core.check_bookmark_storage(features) def find_identities(self, _): - asyncio.ensure_future( + asyncio.create_task( self.core.xmpp['xep_0030'].get_info_from_domain(), ) @@ -1097,7 +1097,7 @@ class HandlerCore: if config.getbool('enable_user_nick'): self.core.xmpp.plugin['xep_0172'].publish_nick( nick=self.core.own_nick, callback=dumb_callback) - asyncio.ensure_future(self.core.xmpp.plugin['xep_0115'].update_caps()) + asyncio.create_task(self.core.xmpp.plugin['xep_0115'].update_caps()) # Start the ping's plugin regular event self.core.xmpp.set_keepalive_values() -- cgit v1.2.3