Skip to content

Commit ed1f480

Browse files
authored
Chore update graphql-core to 3.3.0 and dropping support for Python 3.6 (#363)
1 parent 3d85d64 commit ed1f480

File tree

12 files changed

+38
-41
lines changed

12 files changed

+38
-41
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: Set up Python 3.8
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
with:
1717
python-version: 3.8
1818
- name: Build wheel and source tarball

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- name: Set up Python 3.8
12-
uses: actions/setup-python@v2
12+
uses: actions/setup-python@v4
1313
with:
1414
python-version: 3.8
1515
- name: Install dependencies

.github/workflows/tests.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,22 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
11+
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy3.8"]
1212
os: [ubuntu-latest, windows-latest]
1313
exclude:
14-
- os: windows-latest
15-
python-version: "3.6"
1614
- os: windows-latest
1715
python-version: "3.7"
1816
- os: windows-latest
1917
python-version: "3.9"
2018
- os: windows-latest
2119
python-version: "3.10"
2220
- os: windows-latest
23-
python-version: "pypy3"
21+
python-version: "pypy3.8"
2422

2523
steps:
26-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2725
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v2
26+
uses: actions/setup-python@v4
2927
with:
3028
python-version: ${{ matrix.python-version }}
3129
- name: Install dependencies
@@ -45,9 +43,9 @@ jobs:
4543
dependency: ["aiohttp", "requests", "websockets"]
4644

4745
steps:
48-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v3
4947
- name: Set up Python 3.8
50-
uses: actions/setup-python@v2
48+
uses: actions/setup-python@v4
5149
with:
5250
python-version: 3.8
5351
- name: Install dependencies with only ${{ matrix.dependency }} extra dependency
@@ -61,9 +59,9 @@ jobs:
6159
runs-on: ubuntu-latest
6260

6361
steps:
64-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@v3
6563
- name: Set up Python 3.8
66-
uses: actions/setup-python@v2
64+
uses: actions/setup-python@v4
6765
with:
6866
python-version: 3.8
6967
- name: Install test dependencies

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GQL
22

3-
This is a GraphQL client for Python 3.6+.
3+
This is a GraphQL client for Python 3.7+.
44
Plays nicely with `graphene`, `graphql-core`, `graphql-js` and any other GraphQL implementation compatible with the spec.
55

66
GQL architecture is inspired by `React-Relay` and `Apollo-Client`.

docs/gql-cli/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
gql-cli
44
=======
55

6-
GQL provides a python 3.6+ script, called `gql-cli` which allows you to execute
6+
GQL provides a python 3.7+ script, called `gql-cli` which allows you to execute
77
GraphQL queries directly from the terminal.
88

99
This script supports http(s) or websockets protocols.

docs/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Introduction
22
============
33

4-
`GQL 3`_ is a `GraphQL`_ Client for Python 3.6+ which plays nicely with other
4+
`GQL 3`_ is a `GraphQL`_ Client for Python 3.7+ which plays nicely with other
55
graphql implementations compatible with the spec.
66

77
Under the hood, it uses `GraphQL-core`_ which is a Python port of `GraphQL.js`_,

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages
44

55
install_requires = [
6-
"graphql-core>=3.2,<3.3",
6+
"graphql-core>=3.3.0a2,<3.4",
77
"yarl>=1.6,<2.0",
88
"backoff>=1.11.1,<3.0",
99
]
@@ -48,8 +48,7 @@
4848
]
4949

5050
install_websockets_requires = [
51-
"websockets>=9,<10;python_version<='3.6'",
52-
"websockets>=10,<11;python_version>'3.6'",
51+
"websockets>=10,<11",
5352
]
5453

5554
install_botocore_requires = [
@@ -82,7 +81,6 @@
8281
"Topic :: Software Development :: Libraries",
8382
"Programming Language :: Python :: 3",
8483
"Programming Language :: Python :: 3 :: Only",
85-
"Programming Language :: Python :: 3.6",
8684
"Programming Language :: Python :: 3.7",
8785
"Programming Language :: Python :: 3.8",
8886
"Programming Language :: Python :: 3.9",

tests/custom_scalars/test_json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def test_json_value_input_in_dsl_argument():
203203
assert (
204204
str(query)
205205
== """addPlayer(
206-
player: {name: "Tim", level: 0, is_connected: false, score: 5, friends: ["Lea"]}
206+
player: { name: "Tim", level: 0, is_connected: false, score: 5, friends: ["Lea"] }
207207
)"""
208208
)
209209

@@ -237,6 +237,6 @@ def test_json_value_input_with_none_list_in_dsl_argument():
237237
assert (
238238
str(query)
239239
== """addPlayer(
240-
player: {name: "Bob", level: 9001, is_connected: true, score: 666.66, friends: null}
240+
player: { name: "Bob", level: 9001, is_connected: true, score: 666.66, friends: null }
241241
)"""
242242
)

tests/starwars/test_dsl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_add_variable_definitions_with_default_value_input_object(ds):
205205
assert (
206206
print_ast(query)
207207
== """
208-
mutation ($review: ReviewInput = {stars: 5, commentary: "Wow!"}, $episode: Episode) {
208+
mutation ($review: ReviewInput = { stars: 5, commentary: "Wow!" }, $episode: Episode) {
209209
createReview(review: $review, episode: $episode) {
210210
stars
211211
commentary
@@ -229,7 +229,7 @@ def test_add_variable_definitions_in_input_object(ds):
229229
print_ast(query)
230230
== """mutation ($stars: Int, $commentary: String, $episode: Episode) {
231231
createReview(
232-
review: {stars: $stars, commentary: $commentary}
232+
review: { stars: $stars, commentary: $commentary }
233233
episode: $episode
234234
) {
235235
stars
@@ -554,7 +554,7 @@ def test_multiple_operations(ds):
554554
mutation CreateReviewMutation {
555555
createReview(
556556
episode: JEDI
557-
review: {stars: 5, commentary: "This is a great movie!"}
557+
review: { stars: 5, commentary: "This is a great movie!" }
558558
) {
559559
stars
560560
commentary

tests/test_aiohttp.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -588,15 +588,15 @@ def test_code():
588588

589589
file_upload_mutation_1 = """
590590
mutation($file: Upload!) {
591-
uploadFile(input:{other_var:$other_var, file:$file}) {
591+
uploadFile(input:{ other_var:$other_var, file:$file }) {
592592
success
593593
}
594594
}
595595
"""
596596

597597
file_upload_mutation_1_operations = (
598-
'{"query": "mutation ($file: Upload!) {\\n uploadFile(input: {other_var: '
599-
'$other_var, file: $file}) {\\n success\\n }\\n}", "variables": '
598+
'{"query": "mutation ($file: Upload!) {\\n uploadFile(input: { other_var: '
599+
'$other_var, file: $file }) {\\n success\\n }\\n}", "variables": '
600600
'{"file": null, "other_var": 42}}'
601601
)
602602

@@ -863,7 +863,7 @@ async def file_sender(file_name):
863863

864864
file_upload_mutation_2_operations = (
865865
'{"query": "mutation ($file1: Upload!, $file2: Upload!) {\\n '
866-
'uploadFile(input: {file1: $file, file2: $file}) {\\n success\\n }\\n}", '
866+
'uploadFile(input: { file1: $file, file2: $file }) {\\n success\\n }\\n}", '
867867
'"variables": {"file1": null, "file2": null}}'
868868
)
869869

@@ -951,14 +951,15 @@ async def handler(request):
951951

952952
file_upload_mutation_3 = """
953953
mutation($files: [Upload!]!) {
954-
uploadFiles(input:{files:$files}) {
954+
uploadFiles(input:{ files:$files }) {
955955
success
956956
}
957957
}
958958
"""
959959

960960
file_upload_mutation_3_operations = (
961-
'{"query": "mutation ($files: [Upload!]!) {\\n uploadFiles(input: {files: $files})'
961+
'{"query": "mutation ($files: [Upload!]!) {\\n uploadFiles('
962+
"input: { files: $files })"
962963
' {\\n success\\n }\\n}", "variables": {"files": [null, null]}}'
963964
)
964965

tests/test_requests.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,15 +399,15 @@ def test_code():
399399

400400
file_upload_mutation_1 = """
401401
mutation($file: Upload!) {
402-
uploadFile(input:{other_var:$other_var, file:$file}) {
402+
uploadFile(input:{ other_var:$other_var, file:$file }) {
403403
success
404404
}
405405
}
406406
"""
407407

408408
file_upload_mutation_1_operations = (
409-
'{"query": "mutation ($file: Upload!) {\\n uploadFile(input: {other_var: '
410-
'$other_var, file: $file}) {\\n success\\n }\\n}", "variables": '
409+
'{"query": "mutation ($file: Upload!) {\\n uploadFile(input: { other_var: '
410+
'$other_var, file: $file }) {\\n success\\n }\\n}", "variables": '
411411
'{"file": null, "other_var": 42}}'
412412
)
413413

@@ -611,7 +611,7 @@ def test_code():
611611

612612
file_upload_mutation_2_operations = (
613613
'{"query": "mutation ($file1: Upload!, $file2: Upload!) {\\n '
614-
'uploadFile(input: {file1: $file, file2: $file}) {\\n success\\n }\\n}", '
614+
'uploadFile(input: { file1: $file, file2: $file }) {\\n success\\n }\\n}", '
615615
'"variables": {"file1": null, "file2": null}}'
616616
)
617617

@@ -710,7 +710,8 @@ def test_code():
710710

711711

712712
file_upload_mutation_3_operations = (
713-
'{"query": "mutation ($files: [Upload!]!) {\\n uploadFiles(input: {files: $files})'
713+
'{"query": "mutation ($files: [Upload!]!) {\\n uploadFiles'
714+
"(input: { files: $files })"
714715
' {\\n success\\n }\\n}", "variables": {"files": [null, null]}}'
715716
)
716717

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[tox]
22
envlist =
33
black,flake8,import-order,mypy,manifest,
4-
py{36,37,38,39,310,py3}
4+
py{37,38,39,310,py3}
55

66
[gh-actions]
77
python =
8-
3.6: py36
98
3.7: py37
109
3.8: py38
1110
3.9: py39
1211
3.10: py310
13-
pypy3: pypy3
12+
pypy-3: pypy3
1413

1514
[testenv]
1615
conda_channels = conda-forge
@@ -28,7 +27,7 @@ deps = -e.[test]
2827
commands =
2928
pip install -U setuptools
3029
; run "tox -- tests -s" to show output for debugging
31-
py{36,37,39,310,py3}: pytest {posargs:tests}
30+
py{37,39,310,py3}: pytest {posargs:tests}
3231
py{38}: pytest {posargs:tests --cov-report=term-missing --cov=gql}
3332

3433
[testenv:black]

0 commit comments

Comments
 (0)