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/test/slixtest.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/test/slixtest.py')
-rw-r--r-- | slixmpp/test/slixtest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/slixmpp/test/slixtest.py b/slixmpp/test/slixtest.py index 0d05a4ac..1c7f12fa 100644 --- a/slixmpp/test/slixtest.py +++ b/slixmpp/test/slixtest.py @@ -622,7 +622,7 @@ class SlixTest(unittest.TestCase): def wait_for_send_queue(self): loop = asyncio.get_event_loop() - future = asyncio.ensure_future(self.xmpp.run_filters(), loop=loop) + future = asyncio.create_task(self.xmpp.run_filters(), loop=loop) queue = self.xmpp.waiting_queue loop.run_until_complete(queue.join()) future.cancel() |