Skip to content

Commit a30b836

Browse files
committed
Update minimum Python version to 3.10
Python 3.9 reaches end-of-life October 2025. Python 3.10 adoption is now mainstream - major frameworks (strawberry, Django 5.0, FastAPI) require it. This enables modern Python features: - Dataclasses with `kw_only` - Union types with `|` syntax (PEP 604) - isinstance() with union types directly - match statements for pattern matching
1 parent 83c2dd6 commit a30b836

File tree

3 files changed

+6
-57
lines changed

3 files changed

+6
-57
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 43 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', '3.14', 'pypy3.9', 'pypy3.10', 'pypy3.11']
12+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.10', 'pypy3.11']
1313

1414
steps:
1515
- name: Checkout project
@@ -36,45 +36,4 @@ jobs:
3636
3737
- name: Run unit tests with tox
3838
id: test
39-
run: tox
40-
41-
tests-old:
42-
name: 🧪 Tests (older Python versions)
43-
runs-on: ubuntu-22.04
44-
45-
strategy:
46-
matrix:
47-
python-version: ['3.7', '3.8']
48-
49-
steps:
50-
- name: Checkout project
51-
id: checkout
52-
uses: actions/checkout@v5
53-
54-
- name: Set up Python 3.14 (tox runner)
55-
id: setup-python
56-
uses: actions/setup-python@v6
57-
with:
58-
python-version: '3.14'
59-
60-
- name: Install uv
61-
id: setup-uv
62-
uses: astral-sh/setup-uv@v6
63-
64-
- name: Install tox and plugins
65-
id: install-tox
66-
run: |
67-
uv pip install --system tox tox-uv tox-gh-actions
68-
69-
- name: Set up target Python ${{ matrix.python-version }}
70-
id: setup-target-python
71-
uses: actions/setup-python@v6
72-
with:
73-
python-version: ${{ matrix.python-version }}
74-
75-
- name: Run unit tests with tox for target
76-
id: test
77-
shell: bash
78-
run: |
79-
ENV="py${{ matrix.python-version }}"; ENV=${ENV/./}
80-
python3.14 -m tox -e "$ENV"
39+
run: tox

pyproject.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "graphql-core"
33
version = "3.3.0a11"
44
description = "GraphQL-core is a Python port of GraphQL.js, the JavaScript reference implementation for GraphQL."
55
readme = "README.md"
6-
requires-python = ">=3.7"
6+
requires-python = ">=3.10"
77
license = "MIT"
88
license-files = ["LICENSE"]
99
authors = [ { name = "Christoph Zwerschke", email = "cito@online.de" } ]
@@ -13,19 +13,13 @@ classifiers = [
1313
"Intended Audience :: Developers",
1414
"License :: OSI Approved :: MIT License",
1515
"Programming Language :: Python :: 3",
16-
"Programming Language :: Python :: 3.7",
17-
"Programming Language :: Python :: 3.8",
18-
"Programming Language :: Python :: 3.9",
1916
"Programming Language :: Python :: 3.10",
2017
"Programming Language :: Python :: 3.11",
2118
"Programming Language :: Python :: 3.12",
2219
"Programming Language :: Python :: 3.13",
2320
"Programming Language :: Python :: 3.14",
2421
]
25-
dependencies = [
26-
"typing-extensions>=4.12.2,<5; python_version >= '3.8' and python_version < '3.10'",
27-
"typing-extensions>=4.7.1,<5; python_version < '3.8'",
28-
]
22+
dependencies = []
2923

3024
[project.urls]
3125
Homepage = "https://github.com/graphql-python/graphql-core"

tox.ini

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3{7,8,9,10,11,12,13,14}, pypy3{9,10,11}, ruff, mypy, docs
2+
envlist = py3{10,11,12,13,14}, pypy3{10,11}, ruff, mypy, docs
33
isolated_build = true
44
requires =
55
tox>=4.8
@@ -9,16 +9,12 @@ installer = uv
99
[gh-actions]
1010
python =
1111
3: py314
12-
3.7: py37
13-
3.8: py38
14-
3.9: py39
1512
3.10: py310
1613
3.11: py311
1714
3.12: py312
1815
3.13: py313
1916
3.14: py314
2017
pypy3: pypy311
21-
pypy3.9: pypy39
2218
pypy3.10: pypy310
2319
pypy3.11: pypy311
2420

@@ -54,5 +50,5 @@ pass_env =
5450
commands =
5551
# to also run the time-consuming tests: tox -e py314 -- --run-slow
5652
# 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}
53+
py3{10,11,12,13},pypy3{10,11}: python -m pytest tests {posargs}
5854
py314: python -m pytest tests {posargs: --cov-report=term-missing --cov=graphql --cov=tests --cov-fail-under=100}

0 commit comments

Comments
 (0)