Skip to content

Commit

Permalink
Fix missing import in executors/asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Dec 30, 2019
1 parent 2ea1004 commit 63cca30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions graphql/execution/executors/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@ def ensure_future(coro_or_future, loop=None): # type: ignore
else:
raise TypeError("A Future, a coroutine or an awaitable is required")


try:
from .asyncio_utils import asyncgen_to_observable, isasyncgen
from inspect import isasyncgen # type: ignore
except Exception:

def isasyncgen(object): # type: ignore
False

try:
from .asyncio_utils import asyncgen_to_observable
except Exception:

def asyncgen_to_observable(asyncgen, loop=None):
pass


class AsyncioExecutor(object):
def __init__(self, loop=None):
# type: (Optional[_UnixSelectorEventLoop]) -> None
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py34,py35,py36,py37,pre-commit,pypy,mypy,docs
envlist = py{27,34,35,36,37,py},pre-commit,mypy,docs

[testenv]
deps =
Expand Down

0 comments on commit 63cca30

Please sign in to comment.