FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.12] gh-109096: Silence test_httpservers fork + threads DeprecationWarning on CGI support by gpshead · Pull Request #109471 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 6 additions & 1 deletion Lib/test/test_httpservers.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import datetime
import threading
from unittest import mock
import warnings
from io import BytesIO, StringIO

import unittest
Expand Down Expand Up @@ -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')

Expand Down

Back | FazBrowse Home | New Git URL