From 14738ff83d852c95a0cf33e5c90a85860a9c5620 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 24 May 2019 20:24:42 +0300 Subject: bpo-8138: Initialize wsgiref's SimpleServer as single-threaded (GH-12977) --- Lib/wsgiref/simple_server.py | 3 ++- Misc/NEWS.d/next/Library/2019-04-27-02-54-23.bpo-8138.osBRGI.rst | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2019-04-27-02-54-23.bpo-8138.osBRGI.rst diff --git a/Lib/wsgiref/simple_server.py b/Lib/wsgiref/simple_server.py index f71563a..93d01a8 100644 --- a/Lib/wsgiref/simple_server.py +++ b/Lib/wsgiref/simple_server.py @@ -127,7 +127,8 @@ class WSGIRequestHandler(BaseHTTPRequestHandler): return handler = ServerHandler( - self.rfile, self.wfile, self.get_stderr(), self.get_environ() + self.rfile, self.wfile, self.get_stderr(), self.get_environ(), + multithread=False, ) handler.request_handler = self # backpointer for logging handler.run(self.server.get_app()) diff --git a/Misc/NEWS.d/next/Library/2019-04-27-02-54-23.bpo-8138.osBRGI.rst b/Misc/NEWS.d/next/Library/2019-04-27-02-54-23.bpo-8138.osBRGI.rst new file mode 100644 index 0000000..e94d0a6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-04-27-02-54-23.bpo-8138.osBRGI.rst @@ -0,0 +1,2 @@ +Don't mark ``wsgiref.simple_server.SimpleServer`` as multi-threaded since +``wsgiref.simple_server.WSGIServer`` is single-threaded. -- cgit v0.12