Skip to content

Commit 8cedfcd

Browse files
committed
Support Python 3.14
1 parent 7ad2484 commit 8cedfcd

File tree

10 files changed

+57
-50
lines changed

10 files changed

+57
-50
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
id: checkout
1818
uses: actions/checkout@v5
1919

20-
- name: Set up Python 3.13
20+
- name: Set up Python 3.14
2121
id: setup-python
2222
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.13"
24+
python-version: "3.14"
2525
architecture: x64
2626

2727
- name: Install uv
@@ -39,4 +39,4 @@ jobs:
3939
with:
4040
mode: instrumentation
4141
token: ${{ secrets.CODSPEED_TOKEN }}
42-
run: tox -e py313 -- -k benchmarks --benchmark-enable --codspeed
42+
run: tox -e py314 -- -k benchmarks --benchmark-enable --codspeed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
id: checkout
1313
uses: actions/checkout@v5
1414

15-
- name: Set up Python 3.13
15+
- name: Set up Python 3.14
1616
id: setup-python
1717
uses: actions/setup-python@v6
1818
with:
19-
python-version: "3.13"
19+
python-version: "3.14"
2020

2121
- name: Install uv
2222
id: setup-uv

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
id: checkout
1616
uses: actions/checkout@v5
1717

18-
- name: Set up Python 3.13
18+
- name: Set up Python 3.14
1919
id: setup-python
2020
uses: actions/setup-python@v6
2121
with:
22-
python-version: "3.13"
22+
python-version: "3.14"
2323

2424
- name: Install uv
2525
id: setup-uv

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.9', 'pypy3.10']
12+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.9', 'pypy3.10', 'pypy3.11']
1313

1414
steps:
1515
- name: Checkout project
@@ -51,11 +51,11 @@ jobs:
5151
id: checkout
5252
uses: actions/checkout@v5
5353

54-
- name: Set up Python 3.13 (tox runner)
54+
- name: Set up Python 3.14 (tox runner)
5555
id: setup-python
5656
uses: actions/setup-python@v6
5757
with:
58-
python-version: '3.13'
58+
python-version: '3.14'
5959

6060
- name: Install uv
6161
id: setup-uv
@@ -77,4 +77,4 @@ jobs:
7777
shell: bash
7878
run: |
7979
ENV="py${{ matrix.python-version }}"; ENV=${ENV/./}
80-
python3.13 -m tox -e "$ENV"
80+
python3.14 -m tox -e "$ENV"

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ version 16.8.2 and supports Python versions 3.6 to 3.13.
2020

2121
You can also try out the latest alpha version 3.3.0a10 of GraphQL-core,
2222
which is up-to-date with GraphQL.js version 17.0.0a3.
23-
Please note that this new minor version of GraphQL-core does not support
24-
Python 3.6 anymore.
23+
This new minor version of GraphQL-core supports Python versions 3.7 to 3.14.
2524

2625
Note that for various reasons, GraphQL-core does not use SemVer like GraphQL.js.
2726
Changes in the major version of GraphQL.js are reflected in the minor version of

pyproject.toml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ classifiers = [
1919
"Programming Language :: Python :: 3.10",
2020
"Programming Language :: Python :: 3.11",
2121
"Programming Language :: Python :: 3.12",
22-
"Programming Language :: Python :: 3.13"
22+
"Programming Language :: Python :: 3.13",
23+
"Programming Language :: Python :: 3.14",
2324
]
2425
dependencies = [
2526
"typing-extensions>=4.12.2,<5; python_version >= '3.8' and python_version < '3.10'",
@@ -34,30 +35,35 @@ Changelog = "https://github.com/graphql-python/graphql-core/releases"
3435

3536
[dependency-groups]
3637
test = [
37-
"anyio>=3.7.1",
38-
"pytest>=8.3; python_version>='3.8'",
38+
"anyio>=4.6; python_version>='3.9'",
39+
"anyio>=3.7; python_version<'3.9'",
40+
"pytest>=8.4; python_version>='3.9'",
41+
"pytest>=8.3; python_version>='3.8' and python_version<'3.9'",
3942
"pytest>=7.4,<8; python_version<'3.8'",
4043
"pytest-benchmark>=5.1; python_version>='3.9'",
4144
"pytest-benchmark>=4.0,<5; python_version<'3.9'",
4245
"pytest-cov>=6.0; python_version>='3.9'",
4346
"pytest-cov>=5.0,<6; python_version>='3.8' and python_version<'3.9'",
4447
"pytest-cov>=4.1,<5; python_version<'3.8'",
45-
"pytest-describe>=2.2",
48+
"pytest-describe>=3.0; python_version>='3.9'",
49+
"pytest-describe>=2.2; python_version<'3.9'",
4650
"pytest-timeout>=2.4",
47-
"pytest-codspeed>=3.1.2; python_version>='3.9'",
48-
"pytest-codspeed>=2.2.1,<3; python_version<'3.8'",
49-
"tox>=4.24; python_version>='3.8'",
51+
"pytest-codspeed>=3.1; python_version>='3.9'",
52+
"pytest-codspeed>=2.2,<3; python_version<'3.8'",
53+
"tox>=4.31; python_version>='3.10'",
54+
"tox>=4.24; python_version>='3.8' and python_version<'3.10'",
5055
"tox>=3.28,<4; python_version<'3.8'",
5156
]
5257
lint = [
5358
"ruff>=0.13,<0.14",
5459
"mypy>=1.18; python_version>='3.9'",
55-
"mypy~=1.14; python_version>='3.8' and python_version<'3.9'",
56-
"mypy~=1.4; python_version<'3.8'",
60+
"mypy>=1.14; python_version>='3.8' and python_version<'3.9'",
61+
"mypy>=1.4; python_version<'3.8'",
5762
"bump2version>=1,<2",
5863
]
5964
doc = [
60-
"sphinx>=7,<9; python_version>='3.8'",
65+
"sphinx>=8,<9; python_version>='3.10'",
66+
"sphinx>=7,<9; python_version>='3.8' and python_version<'3.10'",
6167
"sphinx>=4,<6; python_version<'3.8'",
6268
"sphinx_rtd_theme>=2,<4",
6369
]

src/graphql/execution/build_field_plan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def build_field_plan(
7373
for (
7474
new_grouped_field_set_defer_usage_set,
7575
new_grouped_field_set_field_group,
76-
) in new_grouped_field_sets.items():
76+
) in new_grouped_field_sets.items(): # pragma: no branch
7777
if new_grouped_field_set_defer_usage_set == defer_usage_set:
7878
new_grouped_field_set = new_grouped_field_set_field_group
7979
break

src/graphql/execution/incremental_graph.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def add_incremental_data_records(
6161
"""Add incremental data records."""
6262
for incremental_data_record in incremental_data_records:
6363
if is_deferred_grouped_field_set_record(incremental_data_record):
64-
for (
65-
deferred_fragment_record
66-
) in incremental_data_record.deferred_fragment_records:
64+
for deferred_fragment_record in (
65+
incremental_data_record.deferred_fragment_records
66+
): # pragma: no branch
6767
deferred_fragment_record.expected_reconcilable_results += 1
6868
self._add_deferred_fragment_record(deferred_fragment_record)
6969

src/graphql/execution/incremental_publisher.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ def _handle_completed_deferred_grouped_field_set(
201201
deferred_grouped_field_set_result
202202
):
203203
remove_subsequent = self._incremental_graph.remove_subsequent_result_record
204-
for (
205-
deferred_fragment_record
206-
) in deferred_grouped_field_set_result.deferred_fragment_records:
204+
for deferred_fragment_record in (
205+
deferred_grouped_field_set_result.deferred_fragment_records
206+
): # pragma: no branch
207207
id_ = deferred_fragment_record.id
208208
if id_ is not None: # pragma: no branch
209209
append_completed(
@@ -216,9 +216,9 @@ def _handle_completed_deferred_grouped_field_set(
216216
"ReconcilableDeferredGroupedFieldSetResult",
217217
deferred_grouped_field_set_result,
218218
)
219-
for (
220-
deferred_fragment_record
221-
) in deferred_grouped_field_set_result.deferred_fragment_records:
219+
for deferred_fragment_record in (
220+
deferred_grouped_field_set_result.deferred_fragment_records
221+
): # pragma: no branch
222222
deferred_fragment_record.reconcilable_results.append(
223223
deferred_grouped_field_set_result
224224
)
@@ -230,9 +230,9 @@ def _handle_completed_deferred_grouped_field_set(
230230
incremental_data_records
231231
)
232232
complete_deferred = self._incremental_graph.complete_deferred_fragment
233-
for (
234-
deferred_fragment_record
235-
) in deferred_grouped_field_set_result.deferred_fragment_records:
233+
for deferred_fragment_record in (
234+
deferred_grouped_field_set_result.deferred_fragment_records
235+
): # pragma: no branch
236236
id_ = deferred_fragment_record.id
237237
if id_ is None:
238238
continue # pragma: no cover
@@ -302,9 +302,9 @@ def _get_best_id_and_sub_path(
302302
path = initial_deferred_fragment_record.path
303303
max_length = len(path.as_list()) if path else 0
304304
best_id = initial_id
305-
for (
306-
deferred_fragment_record
307-
) in deferred_grouped_field_set_result.deferred_fragment_records:
305+
for deferred_fragment_record in (
306+
deferred_grouped_field_set_result.deferred_fragment_records
307+
): # pragma: no branch
308308
if deferred_fragment_record is initial_deferred_fragment_record:
309309
continue
310310
id_ = deferred_fragment_record.id

tox.ini

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
[tox]
2-
envlist = py3{7,8,9,10,11,12,13}, pypy3{9,10}, ruff, mypy, docs
2+
envlist = py3{7,8,9,10,11,12,13,14}, pypy3{9,10,11}, ruff, mypy, docs
33
isolated_build = true
44
requires =
5-
tox>4.8
5+
tox>=4.8
66
tox-uv>=1.12
77
installer = uv
88

99
[gh-actions]
1010
python =
11-
3: py313
11+
3: py314
1212
3.7: py37
1313
3.8: py38
1414
3.9: py39
1515
3.10: py310
1616
3.11: py311
1717
3.12: py312
1818
3.13: py313
19-
pypy3: pypy39
19+
3.14: py314
20+
pypy3: pypy311
2021
pypy3.9: pypy39
2122
pypy3.10: pypy310
23+
pypy3.11: pypy311
2224

2325
[testenv:ruff]
24-
basepython = python3.13
26+
basepython = python3.14
2527
dependency_groups = lint
2628
skip_install = true
2729
commands =
2830
python -m ruff check src tests
2931
python -m ruff format --check src tests
3032

3133
[testenv:mypy]
32-
basepython = python3.13
34+
basepython = python3.14
3335
dependency_groups = lint, test
3436
skip_install = true
3537
#setenv =
@@ -38,7 +40,7 @@ commands =
3840
python -m mypy src tests
3941

4042
[testenv:docs]
41-
basepython = python3.13
43+
basepython = python3.14
4244
dependency_groups = doc
4345
skip_install = true
4446
commands =
@@ -50,7 +52,7 @@ pass_env =
5052
CODSPEED_*
5153
GITHUB_*
5254
commands =
53-
# to also run the time-consuming tests: tox -e py313 -- --run-slow
54-
# to run the benchmarks: tox -e py313 -- -k benchmarks --benchmark-enable
55-
py3{7,8,9,10,11,12},pypy3{9,10}: python -m pytest tests {posargs}
56-
py313: python -m pytest tests {posargs: --cov-report=term-missing --cov=graphql --cov=tests --cov-fail-under=100}
55+
# to also run the time-consuming tests: tox -e py314 -- --run-slow
56+
# to run the benchmarks: tox -e py314 -- -k benchmarks --benchmark-enable
57+
py3{7,8,9,10,11,12,13},pypy3{9,10,11}: python -m pytest tests {posargs}
58+
py314: python -m pytest tests {posargs: --cov-report=term-missing --cov=graphql --cov=tests --cov-fail-under=100}

0 commit comments

Comments
 (0)