From c1e5dd0fbb2f1f7e38289832657c69b858bb9bce Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 19 May 2023 14:26:39 +0530 Subject: [PATCH] Suppress the warning about cgi deprecation that is causing tests with warnings turned into errors to fail --- setup/test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup/test.py b/setup/test.py index 6855681be6..7a142f94d5 100644 --- a/setup/test.py +++ b/setup/test.py @@ -40,6 +40,11 @@ class Test(Command): self.info(f'Re-execing with LD_PRELOAD={os.environ["LD_PRELOAD"]}') sys.stdout.flush() os.execl('setup.py', *sys.argv) + + # cgi is used by feedparser and possibly other dependencies + import warnings + warnings.filterwarnings('ignore', message="'cgi' is deprecated and slated for removal in Python 3.13") + if is_ci and ismacos: import ctypes sys.libxml2_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libxml2.dylib'))