From 22ed4dd34495f0b793453f7c72028726a30a84ce Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 8 May 2023 16:21:09 -0500 Subject: [PATCH 1/3] importlib moved abc.Loader into _abc https://github.com/python/cpython/pull/20938 --- src/ModuleManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ModuleManager.py b/src/ModuleManager.py index a43181fe..034be660 100644 --- a/src/ModuleManager.py +++ b/src/ModuleManager.py @@ -235,7 +235,7 @@ def _load_module(self, bot: "IRCBot.Bot", definition: ModuleDefinition, definition.filename) module = importlib.util.module_from_spec(import_spec) sys.modules[import_name] = module - loader = typing.cast(importlib.abc.Loader, import_spec.loader) + loader = typing.cast(importlib._abc.Loader, import_spec.loader) loader.exec_module(module) module_object_pointer = getattr(module, "Module", None) From d053060a56cb4b73a26d2da7320dbbc9dc60ec35 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 8 May 2023 16:23:51 -0500 Subject: [PATCH 2/3] Resolving "TypeError: Passing coroutines is forbidden, use tasks explicitly." https://docs.python.org/3/library/asyncio-task.html#asyncio.wait --- src/utils/http.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/utils/http.py b/src/utils/http.py index 045d9641..9f266e6e 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -301,13 +301,11 @@ async def _request(request): responses[request.id] = Response(response.code, response.body, encoding, headers, {}) - loop = asyncio.new_event_loop() - awaits = [] - for request in requests: - awaits.append(_request(request)) - task = asyncio.wait(awaits, loop=loop, timeout=5) - loop.run_until_complete(task) - loop.close() + async def _getResponses(requests): + tasks = [asyncio.create_task(_request(request)) for request in requests] + done,pending = await asyncio.wait(tasks) + + asyncio.run(_getResponses(requests)) return responses From b9ffe7b02771d86288d4e8f90b3c275e175c8128 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 17:29:10 -0500 Subject: [PATCH 3/3] Bump requests from 2.22.0 to 2.31.0 (#365) Bumps [requests](https://github.com/psf/requests) from 2.22.0 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.22.0...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7a160547..7fa55507 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ netifaces ==0.10.9 PySocks ==1.7.1 python-dateutil ==2.8.1 pytz ==2019.2 -requests ==2.22.0 +requests ==2.31.0 scrypt ==0.8.13 suds-jurko ==0.6 tornado ==6.0.3