diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2021-11-18 15:33:03 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2021-11-18 15:33:03 +0100 |
commit | bac6a4b2bf2fc98401e0de7168c4a5cf31b08b37 (patch) | |
tree | 5c617870f7d431cd377bfaf8ae8bcde9a52f8859 /slixmpp/plugins/xep_0163.py | |
parent | d4067275ff0eb646afaac2b0cbc9f351349ba9c0 (diff) | |
download | slixmpp-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.py | 4 |
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, ) |