Skip to content

Commit ca68e1e

Browse files
committed
feat: add support for python 3.14
Bumped graphene-directives to 0.5.0 Dropped support up to python 3.8
1 parent 0c50454 commit ca68e1e

File tree

10 files changed

+31
-33
lines changed

10 files changed

+31
-33
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v5
14-
- name: Set up Python 3.11
14+
- name: Set up Python
1515
uses: actions/setup-python@v5
1616
with:
17-
python-version: '3.11'
17+
python-version: '3.14'
1818
- name: Build wheel and source tarball
1919
run: |
2020
python -m pip install --upgrade pip

.github/workflows/lint.yml

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

99
steps:
1010
- uses: actions/checkout@v4
11-
- name: Set up Python 3.11
11+
- name: Set up Python
1212
uses: actions/setup-python@v5
1313
with:
14-
python-version: 3.11
14+
python-version: 3.14
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
11+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1212

1313
steps:
1414
- uses: actions/checkout@v4

graphene_federation/composable_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(
1818
description: Optional[str] = None,
1919
extensions: Optional[Dict[str, Any]] = None,
2020
ast_node: Optional[DirectiveDefinitionNode] = None,
21-
spec_url: str = None,
21+
spec_url: Optional[str] = None,
2222
add_to_schema_directives: bool = True,
2323
) -> None:
2424
"""

graphene_federation/directives/key.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Union
1+
from typing import Any, Optional, Union
22

33
from graphene_directives import directive_decorator
44

@@ -13,9 +13,9 @@
1313

1414
def key(
1515
fields: Union[str, list[str]],
16-
resolvable: bool = None,
16+
resolvable: Optional[bool] = None,
1717
*,
18-
auto_case: bool = True,
18+
auto_case: Optional[bool] = True,
1919
federation_version: FederationVersion = LATEST_VERSION,
2020
) -> Any:
2121
"""

graphene_federation/directives/list_size.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Callable
1+
from typing import Callable, Optional
22

33
from graphene_directives import directive_decorator
44

@@ -12,10 +12,10 @@
1212

1313
def list_size(
1414
graphene_type,
15-
assumed_size: int = None,
16-
slicing_arguments: list[str] = None,
17-
sized_fields: list[str] = None,
18-
require_one_slicing_argument: bool = None,
15+
assumed_size: Optional[int] = None,
16+
slicing_arguments: Optional[list[str]] = None,
17+
sized_fields: Optional[list[str]] = None,
18+
require_one_slicing_argument: Optional[bool] = None,
1919
*,
2020
federation_version: FederationVersion = LATEST_VERSION,
2121
) -> Callable:

graphene_federation/directives/override.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Callable
1+
from typing import Callable, Optional
22

33
from graphene_directives import directive_decorator
44

@@ -13,7 +13,7 @@
1313
def override(
1414
graphene_type,
1515
from_: str,
16-
label: str = None,
16+
label: Optional[str] = None,
1717
*,
1818
federation_version: FederationVersion = LATEST_VERSION,
1919
) -> Callable:

graphene_federation/schema.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ def _add_sharable_to_page_info_type(
6464

6565

6666
def build_schema(
67-
query: Union[ObjectType, Type[ObjectType]] = None,
68-
mutation: Union[ObjectType, Type[ObjectType]] = None,
69-
subscription: Union[ObjectType, Type[ObjectType]] = None,
70-
types: Collection[Union[ObjectType, Type[ObjectType]]] = None,
71-
directives: Union[Collection[ComposableDirective], None] = None,
72-
include_graphql_spec_directives: bool = True,
73-
schema_directives: Collection[SchemaDirective] = None,
67+
query: Optional[Union[ObjectType, Type[ObjectType]]] = None,
68+
mutation: Optional[Union[ObjectType, Type[ObjectType]]] = None,
69+
subscription: Optional[Union[ObjectType, Type[ObjectType]]] = None,
70+
types: Optional[Collection[Union[ObjectType, Type[ObjectType]]]] = None,
71+
directives: Optional[Union[Collection[ComposableDirective], None]] = None,
72+
include_graphql_spec_directives: Optional[bool] = True,
73+
schema_directives: Optional[Collection[SchemaDirective]] = None,
7474
auto_camelcase: bool = True,
75-
federation_version: FederationVersion = None,
75+
federation_version: Optional[FederationVersion] = None,
7676
) -> Schema:
7777
"""
7878
Build Schema.

graphene_federation/validators/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from enum import Enum
2-
from typing import Union
2+
from typing import Optional, Union
33

44
from graphene import Field, Interface, NonNull, ObjectType
55
from graphene.types.definitions import (
@@ -301,7 +301,7 @@ def evaluate_ast(
301301
def build_ast(
302302
fields: str,
303303
directive_name: str,
304-
additional_valid_special_characters: set[str] = None,
304+
additional_valid_special_characters: Optional[set[str]] = None,
305305
) -> dict:
306306
"""
307307
Converts the fields string to an AST tree

setup.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ def read(*rnames):
1010
version = "3.3.0"
1111

1212
tests_require = [
13-
"pytest==7.1.2",
13+
"pytest==8.4.2",
1414
"pytest-cov",
1515
]
1616

1717
dev_require = [
1818
"black==23.12.1",
19-
"flake8==4.0.1",
20-
"mypy==0.961",
19+
"flake8==7.3.0",
20+
"mypy==1.18.2",
2121
] + tests_require
2222

2323
setup(
@@ -36,20 +36,18 @@ def read(*rnames):
3636
install_requires=[
3737
"graphene>=3.1",
3838
"graphql-core>=3.1",
39-
"graphene-directives>=0.4.8",
39+
"graphene-directives>=0.5.0",
4040
],
4141
classifiers=[
4242
"Development Status :: 5 - Production/Stable",
4343
"Intended Audience :: Developers",
4444
"Topic :: Software Development :: Libraries",
45-
"Programming Language :: Python :: 3.6",
46-
"Programming Language :: Python :: 3.7",
47-
"Programming Language :: Python :: 3.8",
4845
"Programming Language :: Python :: 3.9",
4946
"Programming Language :: Python :: 3.10",
5047
"Programming Language :: Python :: 3.11",
5148
"Programming Language :: Python :: 3.12",
5249
"Programming Language :: Python :: 3.13",
50+
"Programming Language :: Python :: 3.14",
5351
],
5452
extras_require={
5553
"test": tests_require,

0 commit comments

Comments
 (0)