Skip to content

Commit c81f2d2

Browse files
committed
Update deps and simplify Sphinx config
1 parent b1316e7 commit c81f2d2

File tree

9 files changed

+37
-243
lines changed

9 files changed

+37
-243
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
steps:
1616
- name: Checkout project
1717
id: checkout
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
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
2828
id: setup-uv
29-
uses: astral-sh/setup-uv@v6
29+
uses: astral-sh/setup-uv@v7
3030

3131
- name: Install tox
3232
id: install-tox

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111
- name: Checkout project
1212
id: checkout
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@v6
1414

1515
- name: Set up Python 3.14
1616
id: setup-python
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Install uv
2222
id: setup-uv
23-
uses: astral-sh/setup-uv@v6
23+
uses: astral-sh/setup-uv@v7
2424

2525
- name: Install tox
2626
id: install-tox

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- name: Checkout project
1515
id: checkout
16-
uses: actions/checkout@v5
16+
uses: actions/checkout@v6
1717

1818
- name: Set up Python 3.14
1919
id: setup-python
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Install uv
2525
id: setup-uv
26-
uses: astral-sh/setup-uv@v6
26+
uses: astral-sh/setup-uv@v7
2727

2828
- name: Build wheel and source tarball with uv
2929
id: build

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- name: Checkout project
1616
id: checkout
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818

1919
- name: Set up Python ${{ matrix.python-version }}
2020
id: setup-python
@@ -24,7 +24,7 @@ jobs:
2424

2525
- name: Install uv
2626
id: setup-uv
27-
uses: astral-sh/setup-uv@v6
27+
uses: astral-sh/setup-uv@v7
2828
with:
2929
enable-cache: true
3030
cache-suffix: ${{ matrix.python-version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ version 16.9.0 and supports Python versions 3.7 to 3.14.
2020

2121
You can also try out the latest alpha version 3.3.0a11 of GraphQL-core,
2222
which is up-to-date with GraphQL.js version 17.0.0a5.
23-
This new minor version of GraphQL-core also supports Python versions 3.7 to 3.14.
23+
This new minor version of GraphQL-core also supports Python versions 3.10 to 3.14.
2424

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

docs/conf.py

Lines changed: 11 additions & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
# General information about the project.
5454
project = "GraphQL-core 3"
55-
copyright = "2025, Christoph Zwerschke"
55+
copyright = "2026, Christoph Zwerschke"
5656
author = "Christoph Zwerschke"
5757

5858
# The version info for the project you're documenting, acts as replacement for
@@ -95,13 +95,6 @@
9595
}
9696
autosummary_generate = True
9797

98-
autodoc_type_aliases = {
99-
"AwaitableOrValue": "graphql.pyutils.AwaitableOrValue",
100-
"FormattedSourceLocation": "graphql.language.FormattedSourceLocation",
101-
"Middleware": "graphql.execution.Middleware",
102-
"TypeMap": "graphql.schema.TypeMap",
103-
}
104-
10598
# GraphQL-core top level modules with submodules that can be omitted.
10699
# Sometimes autodoc cannot find classes since it is looking for the
107100
# qualified form, but the documentation has the shorter form.
@@ -123,201 +116,18 @@
123116
"validation": ["rules", "validation_context"],
124117
}
125118

126-
# GraphQL-core classes that autodoc sometimes cannot find
127-
# (e.g. where specified as string in type hints).
128-
# We need to give autodoc a little help in this cases, too:
129-
graphql_classes = {
130-
"GraphQLAbstractType": "type",
131-
"GraphQLFieldResolver": "type",
132-
"GraphQLObjectType": "type",
133-
"GraphQLOutputType": "type",
134-
"GraphQLTypeResolver": "type",
135-
"AwaitableOrValue": "execution",
136-
"Middleware": "execution",
137-
"Node": "language",
138-
"Source": "language",
139-
"SourceLocation": "language",
140-
}
141-
142-
# ignore the following undocumented or internal references:
143-
ignore_references = {
144-
"GNT",
145-
"GT",
146-
"KT",
147-
"T",
148-
"VT",
149-
"TContext",
150-
"Enum",
151-
"traceback",
152-
"TypeMap",
153-
"AwaitableOrValue",
154-
"CancellableStreamRecord",
155-
"DeferredFragmentRecord",
156-
"DeferredGroupedFieldSetRecord",
157-
"DeferredGroupedFieldSetResult",
158-
"DeferUsage",
159-
"EnterLeaveVisitor",
160-
"ExperimentalIncrementalExecutionResults",
161-
"FieldGroup",
162-
"FormattedCompletedResult",
163-
"FormattedIncrementalResult",
164-
"FormattedPendingResult",
165-
"FormattedSourceLocation",
166-
"GraphQLAbstractType",
167-
"GraphQLCompositeType",
168-
"GraphQLEnumValueMap",
169-
"GraphQLErrorExtensions",
170-
"GraphQLFieldResolver",
171-
"GraphQLInputType",
172-
"GraphQLLeafType",
173-
"GraphQLNullableType",
174-
"GraphQLOutputType",
175-
"GraphQLTypeResolver",
176-
"GraphQLWrappedResult",
177-
"GroupedFieldSet",
178-
"IncrementalContext",
179-
"IncrementalDataRecord",
180-
"IncrementalResult",
181-
"Middleware",
182-
"PendingResult",
183-
"StreamItemRecord",
184-
"StreamItemResult",
185-
"StreamItemsResult",
186-
"StreamRecord",
187-
"SubsequentDataRecord",
188-
"SubsequentResultRecord",
189-
"UndefinedType",
190-
"asyncio.events.AbstractEventLoop",
191-
"collections.abc.MutableMapping",
192-
"collections.abc.MutableSet",
193-
"enum.Enum",
194-
"graphql.execution.build_field_plan.FieldGroup",
195-
"graphql.execution.build_field_plan.FieldPlan",
196-
"graphql.execution.collect_fields.CollectedFields",
197-
"graphql.execution.collect_fields.DeferUsage",
198-
"graphql.execution.collect_fields.FieldDetails",
199-
"graphql.execution.execute.GraphQLWrappedResult",
200-
"graphql.execution.execute.IncrementalContext",
201-
"graphql.execution.execute.StreamArguments",
202-
"graphql.execution.execute.SubFieldPlan",
203-
"graphql.execution.execute.StreamUsage",
204-
"graphql.execution.incremental_publisher.IncrementalPublisher",
205-
"graphql.execution.incremental_publisher.IncrementalPublisherContext",
206-
"graphql.execution.map_async_iterable.map_async_iterable",
207-
"graphql.execution.Middleware",
208-
"graphql.execution.types.BareDeferredGroupedFieldSetResult",
209-
"graphql.execution.types.BareStreamItemsResult",
210-
"graphql.execution.types.CancellableStreamRecord",
211-
"graphql.execution.types.CompletedResult",
212-
"graphql.execution.types.DeferredFragmentRecord",
213-
"graphql.execution.types.DeferredGroupedFieldSetRecord",
214-
"graphql.execution.types.FormattedCompletedResult",
215-
"graphql.execution.types.FormattedPendingResult",
216-
"graphql.execution.types.NonReconcilableStreamItemsResult",
217-
"graphql.execution.types.PendingResult",
218-
"graphql.execution.types.ReconcilableStreamItemsResult",
219-
"graphql.execution.types.StreamItemResult",
220-
"graphql.execution.types.StreamRecord",
221-
"graphql.execution.types.SubsequentResultRecord",
222-
"graphql.execution.types.TerminatingStreamItemsResult",
223-
"graphql.language.lexer.EscapeSequence",
224-
"graphql.language.visitor.EnterLeaveVisitor",
225-
"graphql.pyutils.ref_map.K",
226-
"graphql.pyutils.ref_map.V",
227-
"graphql.type.definition.GT_co",
228-
"graphql.type.definition.GNT_co",
229-
"graphql.type.definition.TContext",
230-
"graphql.type.schema.InterfaceImplementations",
231-
"graphql.validation.validation_context.VariableUsage",
232-
"graphql.validation.rules.known_argument_names.KnownArgumentNamesOnDirectivesRule",
233-
"graphql.validation.rules.provided_required_arguments.ProvidedRequiredArgumentsOnDirectivesRule",
234-
}
235-
236-
ignore_references.update(__builtins__)
237-
238-
239-
def on_missing_reference(app, env, node, contnode):
240-
"""Fix or skip any missing references."""
241-
if node.get("refdomain") != "py":
242-
return None
243-
target = node.get("reftarget")
244-
if not target:
245-
return None
246-
if target in ignore_references or target.endswith("Kwargs"):
247-
return contnode
248-
typ = node.get("reftype")
249-
name = target.rsplit(".", 1)[-1]
250-
if name in ("GT", "GNT", "KT", "T", "VT"):
251-
return contnode
252-
if (
253-
typ == "obj"
254-
and target.startswith("typing.")
255-
and name in ("Any", "Optional", "Union")
256-
):
257-
return contnode
258-
if typ != "class":
259-
return None
260-
if "." in target: # maybe too specific
261-
base_module, target = target.split(".", 1)
262-
if base_module == "graphql":
263-
if "." not in target:
264-
return None
265-
base_module, target = target.split(".", 1)
266-
if "." not in target:
267-
return None
268-
sub_modules = graphql_modules.get(base_module)
269-
if not sub_modules:
270-
return None
271-
sub_module = target.split(".", 1)[0]
272-
if sub_module not in sub_modules:
273-
return None
274-
target = "graphql." + base_module + "." + target.rsplit(".", 1)[-1]
275-
else: # maybe not specific enough
276-
base_module = graphql_classes.get(target)
277-
if not base_module:
278-
return None
279-
target = "graphql." + base_module + "." + target
280-
# replace target
281-
if contnode.__class__.__name__ == "Text":
282-
contnode = contnode.__class__(target)
283-
elif contnode.__class__.__name__ == "literal":
284-
if len(contnode.children) != 1:
285-
return None
286-
textnode = contnode.children[0]
287-
contnode.children[0] = textnode.__class__(target)
288-
else:
289-
return None
290-
node["reftarget"] = target
291-
fromdoc = node.get("refdoc")
292-
if not fromdoc:
293-
doc_module = node.get("py:module")
294-
if doc_module:
295-
if doc_module.startswith("graphql."):
296-
doc_module = doc_module.split(".", 1)[-1]
297-
if doc_module not in graphql_modules and doc_module != "graphql":
298-
doc_module = None
299-
fromdoc = "modules/" + (doc_module or base_module)
300-
# try resolving again with replaced target
301-
return env.domains["py"].resolve_xref(
302-
env, fromdoc, app.builder, typ, target, node, contnode
303-
)
304-
305-
306-
def on_skip_member(_app, what, name, _obj, skip, _options):
307-
if what == "class" and name == "__init__":
308-
# we could set "special-members" to "__init__",
309-
# but this gives an error when documenting modules
310-
return False
311-
return skip
312-
313-
314-
def setup(app):
315-
app.connect("missing-reference", on_missing_reference)
316-
app.connect("autodoc-skip-member", on_skip_member)
317-
318-
319119
# be nitpicky (handle all possible problems in on_missing_reference)
320120
nitpicky = True
121+
nitpick_ignore = [
122+
# TypeVars and internal types that can't be resolved
123+
("py:obj", "graphql.pyutils.ref_map.K"),
124+
("py:obj", "graphql.pyutils.ref_map.V"),
125+
("py:obj", "graphql.type.definition.GT_co"),
126+
("py:obj", "graphql.type.definition.GNT_co"),
127+
("py:obj", "graphql.type.definition.TContext"),
128+
]
129+
130+
suppress_warnings = ["ref.class", "ref.python"]
321131

322132

323133
# The reST default role (used for this markup: `text`) to use for all

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx>=7,<8
2-
sphinx_rtd_theme>=2,<3
1+
sphinx>=9,<10
2+
sphinx_rtd_theme>=3.1.0rc2,<4

pyproject.toml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,23 @@ Changelog = "https://github.com/graphql-python/graphql-core/releases"
2929

3030
[dependency-groups]
3131
test = [
32-
"anyio>=4.6; python_version>='3.9'",
33-
"anyio>=3.7; python_version<'3.9'",
34-
"pytest>=8.4; python_version>='3.9'",
35-
"pytest>=8.3; python_version>='3.8' and python_version<'3.9'",
36-
"pytest>=7.4,<8; python_version<'3.8'",
37-
"pytest-benchmark>=5.2; python_version>='3.9'",
38-
"pytest-benchmark>=4.0,<5; python_version<'3.9'",
39-
"pytest-cov>=6.0; python_version>='3.9'",
40-
"pytest-cov>=5.0,<6; python_version>='3.8' and python_version<'3.9'",
41-
"pytest-cov>=4.1,<5; python_version<'3.8'",
42-
"pytest-describe>=3.0; python_version>='3.9'",
43-
"pytest-describe>=2.2; python_version<'3.9'",
44-
"pytest-timeout>=2.4",
45-
"pytest-codspeed>=3.1; python_version>='3.9'",
46-
"pytest-codspeed>=2.2,<3; python_version<'3.8'",
47-
"tox>=4.32; python_version>='3.10'",
48-
"tox>=4.24; python_version>='3.8' and python_version<'3.10'",
49-
"tox>=3.28,<4; python_version<'3.8'",
32+
"anyio>=4.12,<5",
33+
"pytest>=9,<10",
34+
"pytest-benchmark>=5.2,<6",
35+
"pytest-cov>=7,<8",
36+
"pytest-describe>=3.1,<4",
37+
"pytest-timeout>=2.4,<3",
38+
"pytest-codspeed>=4.2",
39+
"tox>=4.34,<5",
5040
]
5141
lint = [
5242
"ruff>=0.14,<0.15",
53-
"mypy>=1.18; python_version>='3.9'",
54-
"mypy>=1.14; python_version>='3.8' and python_version<'3.9'",
55-
"mypy>=1.4; python_version<'3.8'",
43+
"mypy>=1.10,<2",
5644
"bump2version>=1,<2",
5745
]
5846
doc = [
59-
"sphinx>=8,<10; python_version>='3.10'",
60-
"sphinx>=7,<9; python_version>='3.8' and python_version<'3.10'",
61-
"sphinx>=4,<6; python_version<'3.8'",
62-
"sphinx_rtd_theme>=2,<4",
47+
"sphinx>=9,<10",
48+
"sphinx_rtd_theme>=3.1.0rc2,<4",
6349
]
6450

6551
[tool.uv]

tox.ini

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
envlist = py3{10,11,12,13,14}, pypy3{10,11}, ruff, mypy, docs
33
isolated_build = true
44
requires =
5-
tox>=4.8
6-
tox-uv>=1.12
5+
tox>=4.34
6+
tox-uv>=1.29
77
installer = uv
88

99
[gh-actions]
@@ -30,8 +30,6 @@ commands =
3030
basepython = python3.14
3131
dependency_groups = lint, test
3232
skip_install = true
33-
#setenv =
34-
# PYTHONPATH = {toxinidir}/src
3533
commands =
3634
python -m mypy src tests
3735

0 commit comments

Comments
 (0)