diff --git a/mod_polling/poller.py b/mod_polling/poller.py index 52e4a90..aaf028d 100644 --- a/mod_polling/poller.py +++ b/mod_polling/poller.py @@ -408,7 +408,8 @@ async def check_github_release(self, mod): url = "https://api.github.com/repos/" + repo + "/releases" if client_id and client_secret: - releases = await self.fetch_json(url, auth=aiohttp.BasicAuth(client_id, client_secret)) + headers = {"Authorization": aiohttp.encode_basic_auth(client_id, client_secret)} + releases = await self.fetch_json(url, headers=headers) else: releases = await self.fetch_json(url) diff --git a/scripts/test_regexes.py b/scripts/test_regexes.py index f77243e..161b8ff 100644 --- a/scripts/test_regexes.py +++ b/scripts/test_regexes.py @@ -235,7 +235,7 @@ async def check_github_release( kwargs = {} if client_id and client_secret: - kwargs["auth"] = aiohttp.BasicAuth(client_id, client_secret) + kwargs["headers"] = {"Authorization": aiohttp.encode_basic_auth(client_id, client_secret)} async with session.get(url, **kwargs) as resp: if resp.status >= 400: