Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix python3.7 compatibility #97

Merged
merged 1 commit into from Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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