summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0163.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2021-11-18 15:33:03 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2021-11-18 15:33:03 +0100
commitbac6a4b2bf2fc98401e0de7168c4a5cf31b08b37 (patch)
tree5c617870f7d431cd377bfaf8ae8bcde9a52f8859 /slixmpp/plugins/xep_0163.py
parentd4067275ff0eb646afaac2b0cbc9f351349ba9c0 (diff)
downloadslixmpp-bac6a4b2bf2fc98401e0de7168c4a5cf31b08b37.tar.gz
slixmpp-bac6a4b2bf2fc98401e0de7168c4a5cf31b08b37.tar.bz2
slixmpp-bac6a4b2bf2fc98401e0de7168c4a5cf31b08b37.tar.xz
slixmpp-bac6a4b2bf2fc98401e0de7168c4a5cf31b08b37.zip
Replace asyncio.ensure_future() with asyncio.create_task()
The latter function got introduced in Python 3.7, which is conveniently our MSPV, so let’s use that.
Diffstat (limited to 'slixmpp/plugins/xep_0163.py')
-rw-r--r--slixmpp/plugins/xep_0163.py4
1 files changed, 2 insertions, 2 deletions
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,
)