From 3c38caf1534708507eb903a344df8fbcb57f1943 Mon Sep 17 00:00:00 2001 From: Will Frey Date: Thu, 4 Aug 2022 17:11:02 -0400 Subject: [PATCH 1/2] Update async_transport.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `@abc.abstractmethod` decorator requires that the class’s metaclass be `abc.ABCMeta` or derived from it. Usually this is satisfied by inherit from `abc.ABC`. See: https://docs.python.org/3/library/abc.html#abc.abstractmethod --- gql/transport/async_transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gql/transport/async_transport.py b/gql/transport/async_transport.py index 18f6df79..4cecc9f9 100644 --- a/gql/transport/async_transport.py +++ b/gql/transport/async_transport.py @@ -4,7 +4,7 @@ from graphql import DocumentNode, ExecutionResult -class AsyncTransport: +class AsyncTransport(abc.ABC): @abc.abstractmethod async def connect(self): """Coroutine used to create a connection to the specified address""" From 1842969ebb19329e2122e5e2832a853d992cac80 Mon Sep 17 00:00:00 2001 From: Will Frey Date: Thu, 4 Aug 2022 22:59:06 -0400 Subject: [PATCH 2/2] Update transport.py Make `Transport` inherit from `abc.ABC`. --- gql/transport/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gql/transport/transport.py b/gql/transport/transport.py index a21502f0..cf5e94da 100644 --- a/gql/transport/transport.py +++ b/gql/transport/transport.py @@ -3,7 +3,7 @@ from graphql import DocumentNode, ExecutionResult -class Transport: +class Transport(abc.ABC): @abc.abstractmethod def execute(self, document: DocumentNode, *args, **kwargs) -> ExecutionResult: """Execute GraphQL query.