From 603b4d8ea381f971a840ce099741786ebcaa3b2a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 18 Jul 2018 13:32:13 -0700 Subject: ui: switch ui.prompt and ui.choice to use asyncio.Futures asyncio's Futures are much like twisted's Deferreds, they represent a value that is not yet available, and they can be awaited like a coroutine. For the moment we still need to return a deferred because the twisted eventloop doesn't use Futures, it uses Deferreds; once we can remove twisted's eventloop we can remove the conversion from a Future to a deferred. --- tests/commands/utils_tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/commands/utils_tests.py b/tests/commands/utils_tests.py index f88244a5..cfa8a8dc 100644 --- a/tests/commands/utils_tests.py +++ b/tests/commands/utils_tests.py @@ -21,7 +21,6 @@ import shutil import gpg import mock from twisted.trial import unittest -from twisted.internet.defer import inlineCallbacks from alot import crypto from alot import errors @@ -110,7 +109,7 @@ class TestGetKeys(unittest.TestCase): FPR, validate=True, encrypt=True, signed_only=False) ui = utilities.make_ui() - # Creat a ui.choice object that can satisfy twisted, but can also be + # Creat a ui.choice object that can satisfy asyncio, but can also be # queried for calls as a mock async def choice(*args, **kwargs): return None -- cgit v1.2.3