Module: Mesa
Branch: main
Commit: 609b4bfef84a365fe4a35d02a88ce4798d8c86df
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=609b4bfef84a365fe4a35d02a88ce4798d8c86df

Author: Guilherme Gallo <guilherme.ga...@collabora.com>
Date:   Sat Oct 28 00:32:54 2023 -0300

ci/bin: Replace AIOHTTPTransport with RequestsHTTPTransport

For some reason AIOHTTPTransport started to use MultiDict after doing
some adjustments in the GraphQL query, which made `filecache` fail
because MultiDict object are not pickle-able.

Changing the transport strategy from AIOHTTPTransport to
RequestsHTTPTransport, which dropped one requirement. We aren't doing
async anyway, all the calls were sync before.

Signed-off-by: Guilherme Gallo <guilherme.ga...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25940>

---

 bin/ci/gitlab_gql.py    | 9 +++------
 bin/ci/requirements.txt | 1 -
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/bin/ci/gitlab_gql.py b/bin/ci/gitlab_gql.py
index e925c886108..31e1cc662cc 100755
--- a/bin/ci/gitlab_gql.py
+++ b/bin/ci/gitlab_gql.py
@@ -14,7 +14,7 @@ from typing import Any, Iterable, Optional, Pattern, Union
 import yaml
 from filecache import DAY, filecache
 from gql import Client, gql
-from gql.transport.aiohttp import AIOHTTPTransport
+from gql.transport.requests import RequestsHTTPTransport
 from graphql import DocumentNode
 
 Dag = dict[str, set[str]]
@@ -56,13 +56,10 @@ class GitlabGQL:
         headers = {}
         if self.token:
             headers["Authorization"] = f"Bearer {self.token}"
-        self._transport = AIOHTTPTransport(
-            url=self.url, headers=headers, client_session_args = { 
"trust_env": True })
+        self._transport = RequestsHTTPTransport(url=self.url, headers=headers)
 
         # Create a GraphQL client using the defined transport
-        self.client = Client(
-            transport=self._transport, fetch_schema_from_transport=True
-        )
+        self.client = Client(transport=self._transport, 
fetch_schema_from_transport=True)
 
     @filecache(DAY)
     def query(
diff --git a/bin/ci/requirements.txt b/bin/ci/requirements.txt
index e329e510617..79cd26fab9a 100644
--- a/bin/ci/requirements.txt
+++ b/bin/ci/requirements.txt
@@ -1,4 +1,3 @@
-aiohttp==3.8.3
 colorama==0.4.5
 filecache==0.81
 gql==3.4.0

Reply via email to