From 7824199eb42640a4b2d83d7f8fc3aa55204dda89 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 13 Oct 2019 13:48:58 +0200 Subject: devtools: Remove explicit loop parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit aiohttp removed it with release 4.0.0a1: https://github.com/aio-libs/aiohttp/commit/c8dbe758e2cfa4304cab9a1b056031aba92e4f02 and we weren’t using it anyway. --- crocoite/devtools.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'crocoite') diff --git a/crocoite/devtools.py b/crocoite/devtools.py index 05680f1..8b5c69d 100644 --- a/crocoite/devtools.py +++ b/crocoite/devtools.py @@ -42,17 +42,16 @@ class Browser: Destroyed upon exit. """ - __slots__ = ('session', 'url', 'tab', 'loop') + __slots__ = ('session', 'url', 'tab') - def __init__ (self, url, loop=None): + def __init__ (self, url): self.url = URL (url) self.session = None self.tab = None - self.loop = loop async def __aiter__ (self): """ List all tabs """ - async with aiohttp.ClientSession (loop=self.loop) as session: + async with aiohttp.ClientSession () as session: async with session.get (self.url.with_path ('/json/list')) as r: resp = await r.json () for tab in resp: @@ -63,7 +62,7 @@ class Browser: """ Create tab """ assert self.tab is None assert self.session is None - self.session = aiohttp.ClientSession (loop=self.loop) + self.session = aiohttp.ClientSession () async with self.session.get (self.url.with_path ('/json/new')) as r: resp = await r.json () self.tab = await Tab.create (**resp) -- cgit v1.2.3