Skip to content

Commit 62d87b8

Browse files
committed
Bump Promise version
fix build fix build 2
1 parent a26e8aa commit 62d87b8

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ nosetests.xml
4545
coverage.xml
4646
*.cover
4747
.pytest_cache/
48+
.python-version
4849

4950
# PyBuilder
5051
target/

graphql/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
set_default_backend,
169169
)
170170

171-
VERSION = (2, 2, 1, "final", 0)
171+
VERSION = (2, 3, 0, "final", 0)
172172
__version__ = get_version(VERSION)
173173

174174

graphql/execution/executor.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def complete_value(
529529
lambda resolved: complete_value(
530530
exe_context, return_type, field_asts, info, path, resolved
531531
),
532-
lambda error: Promise.rejected(
532+
lambda error: Promise.rejected( # type: ignore
533533
GraphQLLocatedError(field_asts, original_error=error, path=path)
534534
),
535535
)
@@ -602,7 +602,9 @@ def complete_list_value(
602602
completed_results.append(completed_item)
603603
index += 1
604604

605-
return Promise.all(completed_results) if contains_promise else completed_results
605+
return ( # type: ignore
606+
Promise.all(completed_results) if contains_promise else completed_results
607+
)
606608

607609

608610
def complete_leaf_value(
@@ -711,7 +713,9 @@ def complete_object_value(
711713

712714
# Collect sub-fields to execute to complete this value.
713715
subfield_asts = exe_context.get_sub_fields(return_type, field_asts)
714-
return execute_fields(exe_context, return_type, result, subfield_asts, path, info)
716+
return execute_fields( # type: ignore
717+
exe_context, return_type, result, subfield_asts, path, info
718+
)
715719

716720

717721
def complete_nonnull_value(

graphql/execution/executors/thread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def clean(self):
3535

3636
def execute_in_thread(self, fn, *args, **kwargs):
3737
# type: (Callable, *Any, **Any) -> Promise
38-
promise = Promise()
38+
promise = Promise() # type: ignore
3939
thread = Thread(target=process, args=(promise, fn, args, kwargs))
4040
thread.start()
4141
self.threads.append(thread)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
sys.path[:] = path_copy
2323

24-
install_requires = ["six>=1.10.0", "promise>=2.1", "rx>=1.6,<3"]
24+
install_requires = ["six>=1.10.0", "promise>=2.3", "rx>=1.6,<3"]
2525

2626
tests_requires = [
2727
"pytest>=3.3,<4.0",

tox.ini

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ envlist = py27,py34,py35,py36,py37,pre-commit,pypy,mypy,docs
33

44
[testenv]
55
deps =
6-
pytest>=3.3,<4.0
7-
gevent>=1.1
8-
promise>=2.0
9-
six>=1.10.0
10-
pytest-mock
11-
pytest-benchmark
6+
.[test]
127
commands =
138
py{27,34,py}: py.test graphql tests {posargs}
149
py{35,36,37}: py.test graphql tests tests_py35 {posargs}

0 commit comments

Comments
 (0)