Suppress the warning about cgi deprecation that is causing tests with warnings turned into errors to fail

This commit is contained in:
Kovid Goyal 2023-05-19 14:26:39 +05:30
parent 26ab48337b
commit c1e5dd0fbb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -40,6 +40,11 @@ class Test(Command):
self.info(f'Re-execing with LD_PRELOAD={os.environ["LD_PRELOAD"]}') self.info(f'Re-execing with LD_PRELOAD={os.environ["LD_PRELOAD"]}')
sys.stdout.flush() sys.stdout.flush()
os.execl('setup.py', *sys.argv) 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: if is_ci and ismacos:
import ctypes import ctypes
sys.libxml2_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libxml2.dylib')) sys.libxml2_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libxml2.dylib'))