diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index cfd8a101dcc1c1..15f944734c608e 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -26,6 +26,7 @@ import datetime import threading from unittest import mock +import warnings from io import BytesIO, StringIO import unittest @@ -699,7 +700,11 @@ def test_html_escape_filename(self): "This test can't be run reliably as root (issue #13308).") class CGIHTTPServerTestCase(BaseTestCase): class request_handler(NoLogRequestHandler, CGIHTTPRequestHandler): - pass + def run_cgi(self): + # Silence the threading + fork DeprecationWarning this causes. + # gh-109096: This is deprecated in 3.13 to go away in 3.15. + with warnings.catch_warnings(action='ignore', category=DeprecationWarning): + return super().run_cgi() linesep = os.linesep.encode('ascii')