Skip to content

Commit f8b3b76

Browse files
committed
Use pypromise package for Promises
1 parent a4caacc commit f8b3b76

File tree

8 files changed

+11
-459
lines changed

8 files changed

+11
-459
lines changed

graphql/execution/executor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
import functools
33
import logging
44

5+
from promise import Promise, is_thenable, promise_for_dict, promisify
6+
57
from ..error import GraphQLError
6-
from ..pyutils.aplus import Promise, is_thenable, promise_for_dict, promisify
78
from ..pyutils.default_ordered_dict import DefaultOrderedDict
89
from ..type import (GraphQLEnumType, GraphQLInterfaceType, GraphQLList,
910
GraphQLNonNull, GraphQLObjectType, GraphQLScalarType,

graphql/execution/executors/asyncio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from __future__ import absolute_import
22

33
from asyncio import Future, ensure_future, get_event_loop, iscoroutine, wait
4-
5-
from graphql.pyutils.aplus import Promise
4+
from promise import Promise
65

76

87
def process_future_result(promise):

graphql/execution/executors/gevent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import gevent
44

5-
from ...pyutils.aplus import Promise
5+
from promise import Promise
6+
67
from .utils import process
78

89

graphql/execution/executors/process.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from multiprocessing import Process, Queue
22

3-
from ...pyutils.aplus import Promise
3+
from promise import Promise
4+
45
from .utils import process
56

67

graphql/execution/executors/thread.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from multiprocessing.pool import ThreadPool
22
from threading import Thread
33

4-
from ...pyutils.aplus import Promise
4+
from promise import Promise
5+
56
from .utils import process
67

78

graphql/execution/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from graphql.pyutils.aplus import Promise
1+
from promise import Promise
22

33

44
def resolved(value):

0 commit comments

Comments
 (0)