Skip to content

Commit a128ee0

Browse files
committed
Support Python 3.8, update dependencies
1 parent 339614c commit a128ee0

File tree

9 files changed

+432
-120
lines changed

9 files changed

+432
-120
lines changed

.travis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ matrix:
66
python: 3.7
77
dist: xenial
88
sudo: true
9+
- name: Unit tests with Python 3.8
10+
env: TOXENV=py38
11+
python: 3.8
12+
dist: xenial
13+
sudo: true
914
- name: Unit tests with Python 3.7
1015
env: TOXENV=py37
1116
python: 3.7
@@ -19,7 +24,7 @@ cache:
1924
- "$HOME/.cache/pip"
2025
- "$TRAVIS_BUILD_DIR/.tox"
2126
install:
22-
- pip install "poetry>=1.0.0b1"
27+
- pip install "poetry>=1.0.0b7"
2328
- poetry install
2429
script:
2530
- tox -e $TOXENV -- --cov-report term-missing --cov=graphql

mypy.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version = 3.7
2+
python_version = 3.8
33
check_untyped_defs = True
44
warn_redundant_casts = True
55
warn_unused_ignores = True

poetry.lock

+406-101
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+8-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ classifiers = [
1919
"License :: OSI Approved :: MIT License",
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3.6",
22-
"Programming Language :: Python :: 3.7"
22+
"Programming Language :: Python :: 3.7",
23+
"Programming Language :: Python :: 3.8"
2324
]
2425
packages = [
2526
{ include = "graphql", from = "src" },
@@ -34,22 +35,23 @@ python = "^3.6"
3435
pytest = "^5"
3536
pytest-asyncio = ">=0.10"
3637
pytest-benchmark = "^3.2"
37-
pytest-cov = "^2.7"
38+
pytest-cov = "^2.8"
3839
pytest-describe = ">=0.12"
3940
pyyaml = "^5.1"
40-
black = ">=19.3b0"
41+
black = ">=19.10b0"
4142
flake8 = "^3.7"
42-
mypy = ">=0.720"
43+
mypy = ">=0.720,<0.730"
4344
codecov = "^2"
4445
sphinx = "^2.2"
4546
sphinx_rtd_theme = ">=0.4"
46-
check-manifest = ">=0.39"
47+
check-manifest = ">=0.40"
4748
bump2version = ">=0.5"
4849
tox = "^3.14"
4950

5051
[tool.black]
5152
target-version = ['py36', 'py37', 'py38']
53+
5254
[build-system]
53-
requires = ["poetry>=1.0.0b1"]
55+
requires = ["poetry>=1.0.0b7"]
5456
build-backend = "poetry.masonry.api"
5557

src/graphql/utilities/build_client_schema.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def build_enum_def(enum_introspection: Dict) -> GraphQLEnumType:
195195
)
196196

197197
def build_input_object_def(
198-
input_object_introspection: Dict
198+
input_object_introspection: Dict,
199199
) -> GraphQLInputObjectType:
200200
if input_object_introspection.get("inputFields") is None:
201201
raise TypeError(
@@ -279,7 +279,7 @@ def build_input_value(input_value_introspection: Dict) -> GraphQLInputField:
279279
)
280280

281281
def build_input_value_def_map(
282-
input_value_introspections: Dict
282+
input_value_introspections: Dict,
283283
) -> Dict[str, GraphQLInputField]:
284284
return {
285285
input_value_introspection["name"]: build_input_value(

src/graphql/utilities/extend_schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def extend_directive(directive: GraphQLDirective) -> GraphQLDirective:
177177
)
178178

179179
def extend_input_object_type(
180-
type_: GraphQLInputObjectType
180+
type_: GraphQLInputObjectType,
181181
) -> GraphQLInputObjectType:
182182
kwargs = type_.to_kwargs()
183183
extensions = type_exts_map.get(kwargs["name"], [])

tests/type/test_validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656

5757
def with_modifiers(
58-
types: List[GraphQLNamedType]
58+
types: List[GraphQLNamedType],
5959
) -> List[Union[GraphQLNamedType, GraphQLNonNull, GraphQLList]]:
6060
return (
6161
cast(List[Union[GraphQLNamedType, GraphQLNonNull, GraphQLList]], types)

tests/utilities/test_strip_ignored_characters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def expect_stripped_string(block_str: str):
413413

414414
# noinspection PyShadowingNames
415415
def strips_kitchen_sink_query_but_maintains_the_exact_same_ast(
416-
kitchen_sink_query # noqa: F811
416+
kitchen_sink_query, # noqa: F811
417417
):
418418
stripped_query = strip_ignored_characters(kitchen_sink_query)
419419
assert strip_ignored_characters(stripped_query) == stripped_query
@@ -424,7 +424,7 @@ def strips_kitchen_sink_query_but_maintains_the_exact_same_ast(
424424

425425
# noinspection PyShadowingNames
426426
def strips_kitchen_sink_sdl_but_maintains_the_exact_same_ast(
427-
kitchen_sink_sdl # noqa: F811
427+
kitchen_sink_sdl, # noqa: F811
428428
):
429429
stripped_sdl = strip_ignored_characters(kitchen_sink_sdl)
430430
assert strip_ignored_characters(stripped_sdl) == stripped_sdl

tox.ini

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[tox]
2-
envlist = py{36,37}, black, flake8, mypy, docs, manifest
2+
envlist = py{36,37,38}, black, flake8, mypy, docs, manifest
33

44
[testenv:black]
55
basepython = python3.7
6-
deps = black>=19.3b0
6+
deps = black>=19.10b0
77
commands =
88
black src tests setup.py --check
99

@@ -15,7 +15,7 @@ commands =
1515

1616
[testenv:mypy]
1717
basepython = python3.7
18-
deps = mypy>=0.720
18+
deps = mypy>=0.720,<0.730
1919
commands =
2020
mypy src tests
2121

@@ -29,7 +29,7 @@ commands =
2929

3030
[testenv:manifest]
3131
basepython = python3.7
32-
deps = check-manifest>=0.39
32+
deps = check-manifest>=0.40
3333
commands =
3434
check-manifest -v
3535

@@ -40,7 +40,7 @@ deps =
4040
pytest>=5.0,<6
4141
pytest-asyncio>=0.10
4242
pytest-benchmark>=3.2,<4
43-
pytest-cov>=2.7,<3
43+
pytest-cov>=2.8,<3
4444
pytest-describe>=0.12
4545
commands =
4646
pytest tests {posargs}

0 commit comments

Comments
 (0)