Skip to content

Commit d69324c

Browse files
committed
Prepare version 2.3.0
1 parent 2c8728e commit d69324c

File tree

10 files changed

+57
-48
lines changed

10 files changed

+57
-48
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ matrix:
1313
python: 3.7
1414
dist: xenial
1515
sudo: true # required workaround for https://github.com/travis-ci/travis-ci/issues/9815
16-
- env: TOXENV=pypy
16+
- env: TOXENV=pypy2
1717
python: pypy
18+
- env: TOXENV=pypy
19+
python: pypy3
1820
- env: TOXENV=pre-commit
1921
python: 3.6
2022
- env: TOXENV=mypy

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
# built documents.
6161
#
6262
# The short X.Y version.
63-
version = "0.1"
63+
version = "2.3"
6464
# The full version, including alpha/beta/rc tags.
65-
release = "0.1a0"
65+
release = "2.3.0"
6666

6767
# The language for content autogenerated by Sphinx. Refer to documentation
6868
# for a list of supported languages.

graphql/__init__.py

Lines changed: 1 addition & 1 deletion
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/backend/compiled.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ def _from_namespace(cls, schema, namespace):
4747
execute = namespace["execute"] # type: Callable
4848

4949
namespace["schema"] = schema
50-
return cls( # type: ignore
50+
return cls(
5151
schema=schema,
5252
document_string=document_string,
53-
document_ast=document_ast,
53+
document_ast=document_ast, # type: ignore
5454
execute=execute,
5555
)

graphql/execution/executor.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ def complete_value(
530530
exe_context, return_type, field_asts, info, path, resolved
531531
),
532532
lambda error: Promise.rejected( # type: ignore
533-
GraphQLLocatedError(field_asts, original_error=error, path=path)
533+
GraphQLLocatedError( # type: ignore
534+
field_asts, original_error=error, path=path
535+
)
534536
),
535537
)
536538

@@ -602,8 +604,10 @@ def complete_list_value(
602604
completed_results.append(completed_item)
603605
index += 1
604606

605-
return ( # type: ignore
606-
Promise.all(completed_results) if contains_promise else completed_results
607+
return (
608+
Promise.all(completed_results) # type: ignore
609+
if contains_promise
610+
else completed_results
607611
)
608612

609613

graphql/language/parser.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -476,33 +476,33 @@ def parse_value_literal(parser, is_const):
476476

477477
elif token.kind == TokenKind.INT:
478478
advance(parser)
479-
return ast.IntValue( # type: ignore
480-
value=token.value, loc=loc(parser, token.start)
479+
return ast.IntValue(
480+
value=token.value, loc=loc(parser, token.start) # type: ignore
481481
)
482482

483483
elif token.kind == TokenKind.FLOAT:
484484
advance(parser)
485-
return ast.FloatValue( # type: ignore
486-
value=token.value, loc=loc(parser, token.start)
485+
return ast.FloatValue(
486+
value=token.value, loc=loc(parser, token.start) # type: ignore
487487
)
488488

489489
elif token.kind == TokenKind.STRING:
490490
advance(parser)
491-
return ast.StringValue( # type: ignore
492-
value=token.value, loc=loc(parser, token.start)
491+
return ast.StringValue(
492+
value=token.value, loc=loc(parser, token.start) # type: ignore
493493
)
494494

495495
elif token.kind == TokenKind.NAME:
496496
if token.value in ("true", "false"):
497497
advance(parser)
498-
return ast.BooleanValue( # type: ignore
498+
return ast.BooleanValue(
499499
value=token.value == "true", loc=loc(parser, token.start)
500500
)
501501

502502
if token.value != "null":
503503
advance(parser)
504-
return ast.EnumValue( # type: ignore
505-
value=token.value, loc=loc(parser, token.start)
504+
return ast.EnumValue(
505+
value=token.value, loc=loc(parser, token.start) # type: ignore
506506
)
507507

508508
elif token.kind == TokenKind.DOLLAR:
@@ -728,10 +728,10 @@ def parse_field_definition(parser):
728728
# type: (Parser) -> FieldDefinition
729729
start = parser.token.start
730730

731-
return ast.FieldDefinition( # type: ignore
731+
return ast.FieldDefinition(
732732
name=parse_name(parser),
733733
arguments=parse_argument_defs(parser),
734-
type=expect(parser, TokenKind.COLON) and parse_type(parser),
734+
type=expect(parser, TokenKind.COLON) and parse_type(parser), # type: ignore
735735
directives=parse_directives(parser),
736736
loc=loc(parser, start),
737737
)
@@ -749,9 +749,9 @@ def parse_input_value_def(parser):
749749
# type: (Parser) -> InputValueDefinition
750750
start = parser.token.start
751751

752-
return ast.InputValueDefinition( # type: ignore
752+
return ast.InputValueDefinition(
753753
name=parse_name(parser),
754-
type=expect(parser, TokenKind.COLON) and parse_type(parser),
754+
type=expect(parser, TokenKind.COLON) and parse_type(parser), # type: ignore
755755
default_value=parse_const_value(parser)
756756
if skip(parser, TokenKind.EQUALS)
757757
else None,
@@ -780,10 +780,11 @@ def parse_union_type_definition(parser):
780780
start = parser.token.start
781781
expect_keyword(parser, "union")
782782

783-
return ast.UnionTypeDefinition( # type: ignore
783+
return ast.UnionTypeDefinition(
784784
name=parse_name(parser),
785785
directives=parse_directives(parser),
786-
types=expect(parser, TokenKind.EQUALS) and parse_union_members(parser),
786+
types=expect(parser, TokenKind.EQUALS) # type: ignore
787+
and parse_union_members(parser),
787788
loc=loc(parser, start),
788789
)
789790

graphql/language/visitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def visit(root, visitor, key_map=None):
148148
if not is_leaving:
149149
stack = Stack(in_array, index, keys, edits, stack)
150150
in_array = isinstance(node, list)
151-
keys = ( # type: ignore
152-
node
151+
keys = (
152+
node # type: ignore
153153
if in_array
154154
else visitor_keys.get(type(node), None) or [] # type: ignore
155155
)

graphql/validation/rules/overlapping_fields_can_be_merged.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -621,12 +621,15 @@ def _get_referenced_fields_and_fragment_names(
621621
if cached:
622622
return cached
623623

624-
fragment_type = type_from_ast( # type: ignore
625-
context.get_schema(), fragment.type_condition
624+
fragment_type = type_from_ast(
625+
context.get_schema(), fragment.type_condition # type: ignore
626626
)
627627

628-
return _get_fields_and_fragments_names( # type: ignore
629-
context, cached_fields_and_fragment_names, fragment_type, fragment.selection_set
628+
return _get_fields_and_fragments_names(
629+
context,
630+
cached_fields_and_fragment_names,
631+
fragment_type, # type: ignore
632+
fragment.selection_set,
630633
)
631634

632635

@@ -659,15 +662,15 @@ def _collect_fields_and_fragment_names(
659662
elif isinstance(selection, ast.InlineFragment):
660663
type_condition = selection.type_condition
661664
if type_condition:
662-
inline_fragment_type = type_from_ast( # type: ignore
663-
context.get_schema(), selection.type_condition
665+
inline_fragment_type = type_from_ast(
666+
context.get_schema(), selection.type_condition # type: ignore
664667
)
665668
else:
666669
inline_fragment_type = parent_type # type: ignore
667670

668-
_collect_fields_and_fragment_names( # type: ignore
671+
_collect_fields_and_fragment_names(
669672
context,
670-
inline_fragment_type,
673+
inline_fragment_type, # type: ignore
671674
selection.selection_set,
672675
ast_and_defs,
673676
fragment_names,
@@ -683,8 +686,8 @@ def _subfield_conflicts(
683686
# type: (...) -> Optional[Tuple[Tuple[str, str], List[Node], List[Node]]]
684687
"""Given a series of Conflicts which occurred between two sub-fields, generate a single Conflict."""
685688
if conflicts:
686-
return ( # type: ignore
687-
(response_name, [conflict[0] for conflict in conflicts]),
689+
return (
690+
(response_name, [conflict[0] for conflict in conflicts]), # type: ignore
688691
tuple(itertools.chain([ast1], *[conflict[1] for conflict in conflicts])),
689692
tuple(itertools.chain([ast2], *[conflict[2] for conflict in conflicts])),
690693
)

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121

2222
sys.path[:] = path_copy
2323

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

2626
tests_requires = [
27-
"pytest>=3.3,<4.0",
27+
"pytest==3.10.1",
2828
"pytest-django==2.9.1",
2929
"pytest-cov==2.3.1",
30-
"coveralls",
31-
"gevent>=1.1",
30+
"coveralls==1.10.0",
31+
"gevent==1.4.0",
3232
"six>=1.10.0",
3333
"pytest-benchmark==3.0.0",
3434
"pytest-mock==1.2",
@@ -67,7 +67,6 @@ def run_tests(self):
6767
"Programming Language :: Python :: 2",
6868
"Programming Language :: Python :: 2.7",
6969
"Programming Language :: Python :: 3",
70-
"Programming Language :: Python :: 3.4",
7170
"Programming Language :: Python :: 3.5",
7271
"Programming Language :: Python :: 3.6",
7372
"Programming Language :: Python :: 3.7",

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[tox]
2-
envlist = py{27,34,35,36,37,py},pre-commit,mypy,docs
2+
envlist = py{27,35,36,37,py,py3},pre-commit,mypy,docs
33

44
[testenv]
55
deps =
66
.[test]
77
commands =
8-
py{27,34,py}: py.test graphql tests {posargs}
9-
py{35,36,37}: py.test graphql tests tests_py35 {posargs}
8+
py{27,py}: py.test graphql tests {posargs}
9+
py{35,36,37,py3}: py.test graphql tests tests_py35 {posargs}
1010

1111
[testenv:pre-commit]
12-
basepython=python3.6
12+
basepython=python3.7
1313
deps =
14-
pre-commit>0.12.0
14+
pre-commit==1.21.0
1515
setenv =
1616
LC_CTYPE=en_US.UTF-8
1717
commands =
1818
pre-commit {posargs:run --all-files}
1919

2020
[testenv:mypy]
21-
basepython=python3.6
21+
basepython=python3.7
2222
deps =
23-
mypy==0.720
23+
mypy==0.761
2424
commands =
2525
mypy graphql --ignore-missing-imports
2626

0 commit comments

Comments
 (0)