From c6551f4bcc6c94cb7890b9829561b855a9e51789 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Mon, 24 Apr 2023 20:09:18 +0200 Subject: [PATCH] Suppress importlib 3.12 warning about load_module (#6094) --- redbot/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/redbot/__init__.py b/redbot/__init__.py index cea25ad6d..2f7a2c84b 100644 --- a/redbot/__init__.py +++ b/redbot/__init__.py @@ -371,3 +371,12 @@ if not any(_re.match("^-(-debug|d+|-verbose|v+)$", i) for i in _sys.argv): module="discord", message="'audioop' is deprecated and slated for removal", ) + # DEP-WARN - will need a fix before Python 3.12 support + # + # DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead + _warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + module="importlib", + message=r"the load_module\(\) method is deprecated and slated for removal", + )