Skip to content

Commit

Permalink
Bump Promise version
Browse files Browse the repository at this point in the history
fix build

fix build 2
  • Loading branch information
jnak committed Dec 27, 2019
1 parent a26e8aa commit 62d87b8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ nosetests.xml
coverage.xml
*.cover
.pytest_cache/
.python-version

# PyBuilder
target/
Expand Down
2 changes: 1 addition & 1 deletion graphql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
set_default_backend,
)

VERSION = (2, 2, 1, "final", 0)
VERSION = (2, 3, 0, "final", 0)
__version__ = get_version(VERSION)


Expand Down
10 changes: 7 additions & 3 deletions graphql/execution/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def complete_value(
lambda resolved: complete_value(
exe_context, return_type, field_asts, info, path, resolved
),
lambda error: Promise.rejected(
lambda error: Promise.rejected( # type: ignore
GraphQLLocatedError(field_asts, original_error=error, path=path)
),
)
Expand Down Expand Up @@ -602,7 +602,9 @@ def complete_list_value(
completed_results.append(completed_item)
index += 1

return Promise.all(completed_results) if contains_promise else completed_results
return ( # type: ignore
Promise.all(completed_results) if contains_promise else completed_results
)


def complete_leaf_value(
Expand Down Expand Up @@ -711,7 +713,9 @@ def complete_object_value(

# Collect sub-fields to execute to complete this value.
subfield_asts = exe_context.get_sub_fields(return_type, field_asts)
return execute_fields(exe_context, return_type, result, subfield_asts, path, info)
return execute_fields( # type: ignore
exe_context, return_type, result, subfield_asts, path, info
)


def complete_nonnull_value(
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/executors/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def clean(self):

def execute_in_thread(self, fn, *args, **kwargs):
# type: (Callable, *Any, **Any) -> Promise
promise = Promise()
promise = Promise() # type: ignore
thread = Thread(target=process, args=(promise, fn, args, kwargs))
thread.start()
self.threads.append(thread)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

sys.path[:] = path_copy

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

tests_requires = [
"pytest>=3.3,<4.0",
Expand Down
7 changes: 1 addition & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ envlist = py27,py34,py35,py36,py37,pre-commit,pypy,mypy,docs

[testenv]
deps =
pytest>=3.3,<4.0
gevent>=1.1
promise>=2.0
six>=1.10.0
pytest-mock
pytest-benchmark
.[test]
commands =
py{27,34,py}: py.test graphql tests {posargs}
py{35,36,37}: py.test graphql tests tests_py35 {posargs}
Expand Down

0 comments on commit 62d87b8

Please sign in to comment.