Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6f0da67

Browse filesBrowse files
derekschrocknejch
authored andcommitted
feat(graphql): update to gql 4.0.0
BREAKING CHANGE: GraphQL.execute() no longer accepts graphql.Source
1 parent c6901a2 commit 6f0da67
Copy full SHA for 6f0da67

File tree

Expand file treeCollapse file tree

4 files changed

+6
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+6
-9
lines changed
Open diff view settings
Collapse file

‎.pre-commit-config.yaml‎

Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
- id: pylint
2626
additional_dependencies:
2727
- argcomplete==2.0.0
28-
- gql==3.5.0
28+
- gql==4.0.0
2929
- httpx==0.27.2
3030
- pytest==7.4.2
3131
- requests==2.28.1
@@ -37,7 +37,7 @@ repos:
3737
- id: mypy
3838
args: []
3939
additional_dependencies:
40-
- gql==3.5.0
40+
- gql==4.0.0
4141
- httpx==0.27.2
4242
- jinja2==3.1.2
4343
- pytest==7.4.2
Collapse file

‎gitlab/client.py‎

Copy file name to clipboardExpand all lines: gitlab/client.py
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
try:
1919
import gql
2020
import gql.transport.exceptions
21-
import graphql
2221
import httpx
2322

2423
from ._backends.graphql import GitlabAsyncTransport, GitlabTransport
@@ -1350,7 +1349,7 @@ def __enter__(self) -> GraphQL:
13501349
def __exit__(self, *args: Any) -> None:
13511350
self._http_client.close()
13521351

1353-
def execute(self, request: str | graphql.Source, *args: Any, **kwargs: Any) -> Any:
1352+
def execute(self, request: str, *args: Any, **kwargs: Any) -> Any:
13541353
parsed_document = self._gql(request)
13551354
retry = utils.Retry(
13561355
max_retries=self._max_retries,
@@ -1420,9 +1419,7 @@ async def __aenter__(self) -> AsyncGraphQL:
14201419
async def __aexit__(self, *args: Any) -> None:
14211420
await self._http_client.aclose()
14221421

1423-
async def execute(
1424-
self, request: str | graphql.Source, *args: Any, **kwargs: Any
1425-
) -> Any:
1422+
async def execute(self, request: str, *args: Any, **kwargs: Any) -> Any:
14261423
parsed_document = self._gql(request)
14271424
retry = utils.Retry(
14281425
max_retries=self._max_retries,
Collapse file

‎pyproject.toml‎

Copy file name to clipboardExpand all lines: pyproject.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dynamic = ["version"]
4343
[project.optional-dependencies]
4444
autocompletion = ["argcomplete>=1.10.0,<3"]
4545
yaml = ["PyYaml>=6.0.1"]
46-
graphql = ["gql[httpx]>=3.5.0,<4"]
46+
graphql = ["gql[httpx]>=3.5.0,<5"]
4747

4848
[project.scripts]
4949
gitlab = "gitlab.cli:main"
Collapse file

‎requirements.txt‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
gql==3.5.3
1+
gql==4.0.0
22
httpx==0.28.1
33
requests==2.32.5
44
requests-toolbelt==1.0.0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.