Skip to content

Commit b1a0d7c

Browse files
committed
Support Python 3.14
1 parent 4af4286 commit b1a0d7c

File tree

18 files changed

+102
-90
lines changed

18 files changed

+102
-90
lines changed

.github/workflows/lint.yml

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

99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v5
1111

12-
- name: Set up Python 3.12
13-
uses: actions/setup-python@v5
12+
- name: Set up Python 3.14
13+
uses: actions/setup-python@v6
1414
with:
15-
python-version: 3.12
15+
python-version: 3.14
1616

1717
- name: Install dependencies
1818
run: |

.github/workflows/publish.yml

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

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414

15-
- name: Set up Python 3.12
16-
uses: actions/setup-python@v5
15+
- name: Set up Python 3.14
16+
uses: actions/setup-python@v6
1717
with:
18-
python-version: 3.12
18+
python-version: 3.14
1919

2020
- name: Build wheel and source tarball
2121
run: |

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88

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

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515

1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v5
17+
uses: actions/setup-python@v6
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020

@@ -34,10 +34,10 @@ jobs:
3434
python-version: ['3.6', '3.7', '3.8']
3535

3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v5
3838

3939
- name: Set up Python ${{ matrix.python-version }}
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343

poetry.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ classifiers = [
2525
"Programming Language :: Python :: 3.10",
2626
"Programming Language :: Python :: 3.11",
2727
"Programming Language :: Python :: 3.12",
28-
"Programming Language :: Python :: 3.13"
28+
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
2930
]
3031
packages = [
3132
{ include = "graphql", from = "src" },
@@ -53,11 +54,17 @@ typing-extensions = [
5354
]
5455

5556
[tool.black]
56-
target-version = ['py36', 'py37', 'py38', 'py39', 'py310', 'py311', 'py312', 'py313']
57+
target-version = [
58+
'py36', 'py37', 'py38', 'py39', 'py310', 'py311', 'py312', 'py313', 'py314'
59+
]
5760

5861
[tool.pyright]
62+
# silence pyright since we're using mypy already
63+
reportArgumentType = false
5964
reportIncompatibleVariableOverride = false
65+
reportMissingModuleSource = false
6066
reportMissingTypeArgument = false
67+
reportReturnType = false
6168
reportUnknownArgumentType = false
6269
reportUnknownMemberType = false
6370
reportUnknownParameterType = false
@@ -77,5 +84,5 @@ disable = [
7784
]
7885

7986
[build-system]
80-
requires = ["poetry_core>=1,<3", "setuptools>=59,<76"]
87+
requires = ["poetry_core>=1,<3", "setuptools>=59,<81"]
8188
build-backend = "poetry.core.masonry.api"

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"Programming Language :: Python :: 3.11",
3636
"Programming Language :: Python :: 3.12",
3737
"Programming Language :: Python :: 3.13",
38+
"Programming Language :: Python :: 3.14",
3839
],
3940
install_requires=[
4041
"typing-extensions>=4,<5; python_version < '3.10'",

src/graphql/language/lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def print_code_point_at(self, location: int) -> str:
6969
return TokenKind.EOF.value
7070
char = body[location]
7171
# Printable ASCII
72-
if "\x20" <= char <= "\x7E":
72+
if "\x20" <= char <= "\x7e":
7373
return "'\"'" if char == '"' else f"'{char}'"
7474
# Unicode code point
7575
point = ord(

src/graphql/pyutils/frozen_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ def popitem(self):
4848
def setdefault(self, key, default=None):
4949
raise FrozenError
5050

51-
def update(self, other=None): # type: ignore
51+
def update(self, other=None):
5252
raise FrozenError

src/graphql/type/definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ def get_nullable_type(type_: GraphQLNonNull) -> GraphQLNullableType: ...
17211721

17221722

17231723
def get_nullable_type(
1724-
type_: Optional[Union[GraphQLNullableType, GraphQLNonNull]]
1724+
type_: Optional[Union[GraphQLNullableType, GraphQLNonNull]],
17251725
) -> Optional[GraphQLNullableType]:
17261726
"""Unwrap possible non-null type"""
17271727
if is_non_null_type(type_):

src/graphql/utilities/extend_schema.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def extend_arg(arg: GraphQLArgument) -> GraphQLArgument:
369369

370370
# noinspection PyShadowingNames
371371
def get_operation_types(
372-
nodes: Collection[Union[SchemaDefinitionNode, SchemaExtensionNode]]
372+
nodes: Collection[Union[SchemaDefinitionNode, SchemaExtensionNode]],
373373
) -> Dict[OperationType, GraphQLNamedType]:
374374
# Note: While this could make early assertions to get the correctly
375375
# typed values below, that would throw immediately while type system
@@ -475,7 +475,7 @@ def build_input_field_map(
475475
return input_field_map
476476

477477
def build_enum_value_map(
478-
nodes: Collection[Union[EnumTypeDefinitionNode, EnumTypeExtensionNode]]
478+
nodes: Collection[Union[EnumTypeDefinitionNode, EnumTypeExtensionNode]],
479479
) -> GraphQLEnumValueMap:
480480
enum_value_map: GraphQLEnumValueMap = {}
481481
for node in nodes:
@@ -681,7 +681,7 @@ def build_type(ast_node: TypeDefinitionNode) -> GraphQLNamedType:
681681

682682

683683
def get_deprecation_reason(
684-
node: Union[EnumValueDefinitionNode, FieldDefinitionNode, InputValueDefinitionNode]
684+
node: Union[EnumValueDefinitionNode, FieldDefinitionNode, InputValueDefinitionNode],
685685
) -> Optional[str]:
686686
"""Given a field or enum value node, get deprecation reason as string."""
687687
from ..execution import get_directive_values
@@ -691,7 +691,7 @@ def get_deprecation_reason(
691691

692692

693693
def get_specified_by_url(
694-
node: Union[ScalarTypeDefinitionNode, ScalarTypeExtensionNode]
694+
node: Union[ScalarTypeDefinitionNode, ScalarTypeExtensionNode],
695695
) -> Optional[str]:
696696
"""Given a scalar node, return the string value for the specifiedByURL."""
697697
from ..execution import get_directive_values

0 commit comments

Comments
 (0)