Skip to content

Commit 6455405

Browse files
fix: ensure ssl verification happens with async client (#54)
* fix: ensure ssl verification happens with async client gql recently had an issue reported where SSL connections are not verified by default: graphql-python/gql#529 They're planning to make it the default behaviour in their next release, but we should ensure SSL verification happens in the meantime. * style: pre-commit.ci auto fixes [...] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5667abd commit 6455405

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ classifiers = [
2020
requires-python = ">=3.8"
2121
dependencies = [
2222
"aiohttp[speedups]~=3.8",
23-
"gql[aiohttp,requests]~=3.4",
23+
"gql[aiohttp,requests]>=3.5.1,<4",
2424
"pyjwt[crypto]~=2.8",
2525
"requests~=2.31",
2626
]

src/simple_github/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ async def _get_gql_session(self) -> ReconnectingAsyncClientSession:
248248
if token:
249249
headers["Authorization"] = f"Bearer {token}"
250250

251-
transport = AIOHTTPTransport(url=GITHUB_GRAPHQL_ENDPOINT, headers=headers)
251+
transport = AIOHTTPTransport(
252+
url=GITHUB_GRAPHQL_ENDPOINT, headers=headers, ssl=True
253+
)
252254
self._gql_client = GqlClient(
253255
transport=transport, fetch_schema_from_transport=False
254256
)

0 commit comments

Comments
 (0)