Skip to content

Commit

Permalink
fix python3.7 compatibility (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
jettify committed Jul 6, 2018
1 parent ec6d980 commit 80b7592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion janus/__init__.py
Expand Up @@ -16,7 +16,7 @@
try:
ensure_future = asyncio.ensure_future
except AttributeError:
ensure_future = asyncio.async
ensure_future = getattr(asyncio, 'async')


class Queue:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_async.py
Expand Up @@ -178,7 +178,7 @@ def test_get_with_putters(self):

@asyncio.coroutine
def put():
t = asyncio.async(q.put(2), loop=self.loop)
t = janus.ensure_future(q.put(2), loop=self.loop)
yield from asyncio.sleep(0.01, loop=self.loop)
fut.set_result(None)
return t
Expand Down

0 comments on commit 80b7592

Please sign in to comment.