require tornado 5.1, async_generator 1.9

- maybe_future relies on changes in 5.1, not in 5.0
- async_generator.asynccontextmanager is new in 1.9
This commit is contained in:
Min RK
2020-11-17 12:23:39 +01:00
parent 0c43feee1b
commit 3c071467bb
2 changed files with 3 additions and 3 deletions

View File

@@ -503,7 +503,7 @@ def maybe_future(obj):
return asyncio.wrap_future(obj)
else:
# could also check for tornado.concurrent.Future
# but with tornado >= 5 tornado.Future is asyncio.Future
# but with tornado >= 5.1 tornado.Future is asyncio.Future
f = asyncio.Future()
f.set_result(obj)
return f