Skip to content

Commit 63cca30

Browse files
committed
Fix missing import in executors/asyncio
1 parent 2ea1004 commit 63cca30

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

graphql/execution/executors/asyncio.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ def ensure_future(coro_or_future, loop=None): # type: ignore
3232
else:
3333
raise TypeError("A Future, a coroutine or an awaitable is required")
3434

35-
3635
try:
37-
from .asyncio_utils import asyncgen_to_observable, isasyncgen
36+
from inspect import isasyncgen # type: ignore
3837
except Exception:
3938

4039
def isasyncgen(object): # type: ignore
4140
False
4241

42+
try:
43+
from .asyncio_utils import asyncgen_to_observable
44+
except Exception:
45+
4346
def asyncgen_to_observable(asyncgen, loop=None):
4447
pass
4548

46-
4749
class AsyncioExecutor(object):
4850
def __init__(self, loop=None):
4951
# type: (Optional[_UnixSelectorEventLoop]) -> None

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py34,py35,py36,py37,pre-commit,pypy,mypy,docs
2+
envlist = py{27,34,35,36,37,py},pre-commit,mypy,docs
33

44
[testenv]
55
deps =

0 commit comments

Comments
 (0)