Skip to content

Commit 666ecdc

Browse files
committed
Update dependencies
1 parent a4e5778 commit 666ecdc

25 files changed

+367
-250
lines changed

poetry.lock

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

pyproject.toml

+17-11
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Changelog = "https://github.com/graphql-python/graphql-core/releases"
4444
[tool.poetry.dependencies]
4545
python = "^3.7"
4646
typing-extensions = [
47-
{ version = "^4.12", python = ">=3.8,<3.10" },
47+
{ version = "^4.12.2", python = ">=3.8,<3.10" },
4848
{ version = "^4.7.1", python = "<3.8" },
4949
]
5050

@@ -57,18 +57,23 @@ pytest = [
5757
{ version = "^7.4", python = "<3.8" }
5858
]
5959
pytest-asyncio = [
60-
{ version = "^0.23.8", python = ">=3.8" },
60+
{ version = "^0.25.2", python = ">=3.9" },
61+
{ version = "~0.24.0", python = ">=3.8,<3.9" },
6162
{ version = "~0.21.1", python = "<3.8" }
6263
]
63-
pytest-benchmark = "^4.0"
64+
pytest-benchmark = [
65+
{ version = "^5.1", python = ">=3.9" },
66+
{ version = "^4.0", python = "<3.9" }
67+
]
6468
pytest-cov = [
65-
{ version = "^5.0", python = ">=3.8" },
69+
{ version = "^6.0", python = ">=3.9" },
70+
{ version = "^5.0", python = ">=3.8,<3.9" },
6671
{ version = "^4.1", python = "<3.8" },
6772
]
6873
pytest-describe = "^2.2"
6974
pytest-timeout = "^2.3"
7075
pytest-codspeed = [
71-
{ version = "^3.1.0", python = ">=3.9" },
76+
{ version = "^3.1.2", python = ">=3.9" },
7277
{ version = "^2.2.1", python = "<3.8" }
7378
]
7479
tox = [
@@ -80,22 +85,22 @@ tox = [
8085
optional = true
8186

8287
[tool.poetry.group.lint.dependencies]
83-
ruff = ">=0.8,<0.9"
88+
ruff = ">=0.9,<0.10"
8489
mypy = [
85-
{ version = "^1.12", python = ">=3.8" },
90+
{ version = "^1.14", python = ">=3.8" },
8691
{ version = "~1.4", python = "<3.8" }
8792
]
88-
bump2version = ">=1.0,<2"
93+
bump2version = ">=1,<2"
8994

9095
[tool.poetry.group.doc]
9196
optional = true
9297

9398
[tool.poetry.group.doc.dependencies]
9499
sphinx = [
95-
{ version = ">=7,<8", python = ">=3.8" },
100+
{ version = ">=7,<9", python = ">=3.8" },
96101
{ version = ">=4,<6", python = "<3.8" }
97102
]
98-
sphinx_rtd_theme = "^2.0"
103+
sphinx_rtd_theme = ">=2,<4"
99104

100105
[tool.ruff]
101106
line-length = 88
@@ -149,6 +154,7 @@ select = [
149154
"YTT", # flake8-2020
150155
]
151156
ignore = [
157+
"A005", # allow using standard-lib module names
152158
"ANN401", # allow explicit Any
153159
"COM812", # allow trailing commas for auto-formatting
154160
"D105", "D107", # no docstring needed for magic methods
@@ -324,5 +330,5 @@ testpaths = ["tests"]
324330
asyncio_default_fixture_loop_scope = "function"
325331

326332
[build-system]
327-
requires = ["poetry_core>=1.6.1,<2"]
333+
requires = ["poetry_core>=1.6.1,<3"]
328334
build-backend = "poetry.core.masonry.api"

src/graphql/execution/values.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ def get_argument_values(
175175
coerced_values[arg_def.out_name or name] = arg_def.default_value
176176
elif is_non_null_type(arg_type): # pragma: no cover else
177177
msg = (
178-
f"Argument '{name}' of required type '{arg_type}'"
179-
" was not provided."
178+
f"Argument '{name}' of required type '{arg_type}' was not provided."
180179
)
181180
raise GraphQLError(msg, node)
182181
continue # pragma: no cover

src/graphql/language/lexer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def read_escaped_unicode_variable_width(self, position: int) -> EscapeSequence:
342342
raise GraphQLSyntaxError(
343343
self.source,
344344
position,
345-
f"Invalid Unicode escape sequence: '{body[position: position + size]}'.",
345+
f"Invalid Unicode escape sequence: '{body[position : position + size]}'.",
346346
)
347347

348348
def read_escaped_unicode_fixed_width(self, position: int) -> EscapeSequence:
@@ -368,7 +368,7 @@ def read_escaped_unicode_fixed_width(self, position: int) -> EscapeSequence:
368368
raise GraphQLSyntaxError(
369369
self.source,
370370
position,
371-
f"Invalid Unicode escape sequence: '{body[position: position + 6]}'.",
371+
f"Invalid Unicode escape sequence: '{body[position : position + 6]}'.",
372372
)
373373

374374
def read_escaped_character(self, position: int) -> EscapeSequence:
@@ -380,7 +380,7 @@ def read_escaped_character(self, position: int) -> EscapeSequence:
380380
raise GraphQLSyntaxError(
381381
self.source,
382382
position,
383-
f"Invalid character escape sequence: '{body[position: position + 2]}'.",
383+
f"Invalid character escape sequence: '{body[position : position + 2]}'.",
384384
)
385385

386386
def read_block_string(self, start: int) -> Token:

src/graphql/type/definition.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,7 @@ def __init__(
386386
self.parse_literal = parse_literal # type: ignore
387387
if parse_literal is not None and parse_value is None:
388388
msg = (
389-
f"{name} must provide"
390-
" both 'parse_value' and 'parse_literal' functions."
389+
f"{name} must provide both 'parse_value' and 'parse_literal' functions."
391390
)
392391
raise TypeError(msg)
393392
self.specified_by_url = specified_by_url

src/graphql/type/introspection.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,7 @@ class TypeKind(Enum):
639639
),
640640
"NON_NULL": GraphQLEnumValue(
641641
TypeKind.NON_NULL,
642-
description="Indicates this type is a non-null."
643-
" `ofType` is a valid field.",
642+
description="Indicates this type is a non-null. `ofType` is a valid field.",
644643
),
645644
},
646645
)

src/graphql/type/scalars.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def parse_id_literal(value_node: ValueNode, _variables: Any = None) -> str:
315315
GraphQLBoolean,
316316
GraphQLID,
317317
)
318-
}
318+
} # pyright: ignore
319319

320320

321321
def is_specified_scalar_type(type_: GraphQLNamedType) -> TypeGuard[GraphQLScalarType]:

src/graphql/type/validate.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,7 @@ def validate_input_fields(self, input_obj: GraphQLInputObjectType) -> None:
454454

455455
if not fields:
456456
self.report_error(
457-
f"Input Object type {input_obj.name}"
458-
" must define one or more fields.",
457+
f"Input Object type {input_obj.name} must define one or more fields.",
459458
[input_obj.ast_node, *input_obj.extension_ast_nodes],
460459
)
461460

src/graphql/utilities/find_breaking_changes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def find_union_type_changes(
294294
schema_changes.append(
295295
DangerousChange(
296296
DangerousChangeType.TYPE_ADDED_TO_UNION,
297-
f"{possible_type.name} was added" f" to union type {old_type.name}.",
297+
f"{possible_type.name} was added to union type {old_type.name}.",
298298
)
299299
)
300300

@@ -407,7 +407,7 @@ def find_arg_changes(
407407
schema_changes.append(
408408
BreakingChange(
409409
BreakingChangeType.ARG_REMOVED,
410-
f"{old_type.name}.{field_name} arg" f" {arg_name} was removed.",
410+
f"{old_type.name}.{field_name} arg {arg_name} was removed.",
411411
)
412412
)
413413

src/graphql/validation/rules/overlapping_fields_can_be_merged.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
def reason_message(reason: ConflictReasonMessage) -> str:
4545
if isinstance(reason, list):
4646
return " and ".join(
47-
f"subfields '{response_name}' conflict"
48-
f" because {reason_message(sub_reason)}"
47+
f"subfields '{response_name}' conflict because {reason_message(sub_reason)}"
4948
for response_name, sub_reason in reason
5049
)
5150
return reason

src/graphql/validation/rules/unique_field_definition_names.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def check_field_uniqueness(
4747
elif field_name in field_names:
4848
self.report_error(
4949
GraphQLError(
50-
f"Field '{type_name}.{field_name}'"
51-
" can only be defined once.",
50+
f"Field '{type_name}.{field_name}' can only be defined once.",
5251
[field_names[field_name], field_def.name],
5352
)
5453
)

tests/error/test_graphql_error.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def serializes_to_include_all_standard_fields():
224224
extensions = {"foo": "bar "}
225225
e_full = GraphQLError("msg", field_node, None, None, path, None, extensions)
226226
assert str(e_full) == (
227-
"msg\n\nGraphQL request:2:3\n" "1 | {\n2 | field\n | ^\n3 | }"
227+
"msg\n\nGraphQL request:2:3\n1 | {\n2 | field\n | ^\n3 | }"
228228
)
229229
assert repr(e_full) == (
230230
"GraphQLError('msg', locations=[SourceLocation(line=2, column=3)],"

tests/execution/test_abstract.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
def sync_and_async(spec):
2424
"""Decorator for running a test synchronously and asynchronously."""
2525
return pytest.mark.asyncio(
26-
pytest.mark.parametrize("sync", (True, False), ids=("sync", "async"))(spec)
26+
pytest.mark.parametrize("sync", [True, False], ids=("sync", "async"))(spec)
2727
)
2828

2929

3030
def access_variants(spec):
3131
"""Decorator for tests with dict and object access, including inheritance."""
3232
return pytest.mark.asyncio(
33-
pytest.mark.parametrize("access", ("dict", "object", "inheritance"))(spec)
33+
pytest.mark.parametrize("access", ["dict", "object", "inheritance"])(spec)
3434
)
3535

3636

tests/execution/test_oneof.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def execute_query(
3535
def describe_execute_handles_one_of_input_objects():
3636
def describe_one_of_input_objects():
3737
root_value = {
38-
"test": lambda _info, input: input,
38+
"test": lambda _info, input: input, # noqa: A006
3939
}
4040

4141
def accepts_a_good_default_value():

tests/execution/test_schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, id: int): # noqa: A002
7878
"article": GraphQLField(
7979
BlogArticle,
8080
args={"id": GraphQLArgument(GraphQLID)},
81-
resolve=lambda _obj, _info, id: Article(id),
81+
resolve=lambda _obj, _info, id: Article(id), # noqa: A006
8282
),
8383
"feed": GraphQLField(
8484
GraphQLList(BlogArticle),

tests/language/test_lexer.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ def lexes_block_strings():
394394
TokenKind.BLOCK_STRING, 0, 19, 1, 1, "slashes \\\\ \\/"
395395
)
396396
assert lex_one(
397-
'"""\n\n spans\n multiple\n'
398-
' lines\n\n """'
397+
'"""\n\n spans\n multiple\n lines\n\n """'
399398
) == Token(TokenKind.BLOCK_STRING, 0, 68, 1, 1, "spans\n multiple\n lines")
400399

401400
def advance_line_after_lexing_multiline_block_string():

tests/language/test_printer.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def correctly_prints_mutation_operation_with_artifacts():
6060

6161
def prints_query_with_variable_directives():
6262
query_ast_with_variable_directive = parse(
63-
"query ($foo: TestType = { a: 123 }"
64-
" @testDirective(if: true) @test) { id }"
63+
"query ($foo: TestType = { a: 123 } @testDirective(if: true) @test) { id }"
6564
)
6665
assert print_ast(query_ast_with_variable_directive) == dedent(
6766
"""

tests/star_wars_schema.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@
140140
"name": GraphQLField(GraphQLString, description="The name of the human."),
141141
"friends": GraphQLField(
142142
GraphQLList(character_interface),
143-
description="The friends of the human,"
144-
" or an empty list if they have none.",
143+
description="The friends of the human, or an empty list if they have none.",
145144
resolve=lambda human, _info: get_friends(human),
146145
),
147146
"appearsIn": GraphQLField(
@@ -182,8 +181,7 @@
182181
"name": GraphQLField(GraphQLString, description="The name of the droid."),
183182
"friends": GraphQLField(
184183
GraphQLList(character_interface),
185-
description="The friends of the droid,"
186-
" or an empty list if they have none.",
184+
description="The friends of the droid, or an empty list if they have none.",
187185
resolve=lambda droid, _info: get_friends(droid),
188186
),
189187
"appearsIn": GraphQLField(
@@ -238,7 +236,7 @@
238236
GraphQLNonNull(GraphQLString), description="id of the human"
239237
)
240238
},
241-
resolve=lambda _source, _info, id: get_human(id),
239+
resolve=lambda _source, _info, id: get_human(id), # noqa: A006
242240
),
243241
"droid": GraphQLField(
244242
droid_type,
@@ -247,7 +245,7 @@
247245
GraphQLNonNull(GraphQLString), description="id of the droid"
248246
)
249247
},
250-
resolve=lambda _source, _info, id: get_droid(id),
248+
resolve=lambda _source, _info, id: get_droid(id), # noqa: A006
251249
),
252250
},
253251
)

tests/type/test_definition.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ def parse_literal(_node: ValueNode, _vars=None):
198198
with pytest.raises(TypeError) as exc_info:
199199
GraphQLScalarType("SomeScalar", parse_literal=parse_literal)
200200
assert str(exc_info.value) == (
201-
"SomeScalar must provide both"
202-
" 'parse_value' and 'parse_literal' functions."
201+
"SomeScalar must provide both 'parse_value' and 'parse_literal' functions."
203202
)
204203

205204
def pickles_a_custom_scalar_type():

tests/type/test_validation.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ def rejects_a_schema_whose_query_root_type_is_not_an_object_type():
242242
)
243243
assert validate_schema(schema) == [
244244
{
245-
"message": "Query root type must be Object type,"
246-
" it cannot be Query.",
245+
"message": "Query root type must be Object type, it cannot be Query.",
247246
"locations": [(2, 13)],
248247
}
249248
]

tests/utilities/test_extend_schema.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1363,8 +1363,7 @@ def does_not_allow_replacing_a_default_directive():
13631363
with pytest.raises(TypeError) as exc_info:
13641364
extend_schema(schema, extend_ast)
13651365
assert str(exc_info.value).startswith(
1366-
"Directive '@include' already exists in the schema."
1367-
" It cannot be redefined."
1366+
"Directive '@include' already exists in the schema. It cannot be redefined."
13681367
)
13691368

13701369
def does_not_allow_replacing_an_existing_enum_value():

tests/utilities/test_find_breaking_changes.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,7 @@ def should_detect_all_breaking_changes():
755755
),
756756
(
757757
BreakingChangeType.TYPE_CHANGED_KIND,
758-
"TypeThatChangesType changed from an Object type to an"
759-
" Interface type.",
758+
"TypeThatChangesType changed from an Object type to an Interface type.",
760759
),
761760
(
762761
BreakingChangeType.FIELD_REMOVED,

tests/utilities/test_type_info.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ def leave(*args):
375375

376376
assert print_ast(edited_ast) == print_ast(
377377
parse(
378-
"{ human(id: 4) { name, pets { __typename } },"
379-
" alien { __typename } }"
378+
"{ human(id: 4) { name, pets { __typename } }, alien { __typename } }"
380379
)
381380
)
382381

tests/validation/test_validation.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ def deprecated_validates_using_a_custom_type_info():
7171
"Cannot query field 'human' on type 'QueryRoot'. Did you mean 'human'?",
7272
"Cannot query field 'meowsVolume' on type 'Cat'."
7373
" Did you mean 'meowsVolume'?",
74-
"Cannot query field 'barkVolume' on type 'Dog'."
75-
" Did you mean 'barkVolume'?",
74+
"Cannot query field 'barkVolume' on type 'Dog'. Did you mean 'barkVolume'?",
7675
]
7776

7877
def validates_using_a_custom_rule():

tox.ini

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,33 @@ python =
1818

1919
[testenv:ruff]
2020
basepython = python3.12
21-
deps = ruff>=0.8,<0.9
21+
deps = ruff>=0.9,<0.10
2222
commands =
2323
ruff check src tests
2424
ruff format --check src tests
2525

2626
[testenv:mypy]
2727
basepython = python3.12
2828
deps =
29-
mypy>=1.12,<2
29+
mypy>=1.14,<2
3030
pytest>=8.3,<9
3131
commands =
3232
mypy src tests
3333

3434
[testenv:docs]
3535
basepython = python3.12
3636
deps =
37-
sphinx>=7,<8
38-
sphinx_rtd_theme>=2.0,<3
37+
sphinx>=8,<9
38+
sphinx_rtd_theme>=3,<4
3939
commands =
4040
sphinx-build -b html -nEW docs docs/_build/html
4141

4242
[testenv]
4343
deps =
4444
pytest>=7.4,<9
4545
pytest-asyncio>=0.21.1,<1
46-
pytest-benchmark>=4,<5
47-
pytest-cov>=4.1,<6
46+
pytest-benchmark>=4,<6
47+
pytest-cov>=4.1,<7
4848
pytest-describe>=2.2,<3
4949
pytest-timeout>=2.3,<3
5050
py3{7,8,9}, pypy39: typing-extensions>=4.7.1,<5

0 commit comments

Comments
 (0)