From bac6a4b2bf2fc98401e0de7168c4a5cf31b08b37 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 18 Nov 2021 15:33:03 +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. --- slixmpp/plugins/xep_0163.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'slixmpp/plugins/xep_0163.py') diff --git a/slixmpp/plugins/xep_0163.py b/slixmpp/plugins/xep_0163.py index 46ca4235..07cef975 100644 --- a/slixmpp/plugins/xep_0163.py +++ b/slixmpp/plugins/xep_0163.py @@ -61,7 +61,7 @@ class XEP_0163(BasePlugin): for ns in namespace: self.xmpp['xep_0030'].add_feature('%s+notify' % ns, jid=jid) - asyncio.ensure_future( + asyncio.create_task( self.xmpp['xep_0115'].update_caps(jid, broadcast=False), loop=self.xmpp.loop, ) @@ -82,7 +82,7 @@ class XEP_0163(BasePlugin): for ns in namespace: self.xmpp['xep_0030'].del_feature(jid=jid, feature='%s+notify' % namespace) - asyncio.ensure_future( + asyncio.create_task( self.xmpp['xep_0115'].update_caps(jid, broadcast=False), loop=self.xmpp.loop, ) -- cgit v1.2.3