Skip to content

Commit 1cee216

Browse files
geryogamJulienPalard
authored andcommitted
bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195)
1 parent 5d97b7b commit 1cee216

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Doc/library/http.server.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ handler. Code to create and run the server looks like this::
3333
:attr:`server_port`. The server is accessible by the handler, typically
3434
through the handler's :attr:`server` instance variable.
3535

36-
.. class:: ThreadedHTTPServer(server_address, RequestHandlerClass)
36+
.. class:: ThreadingHTTPServer(server_address, RequestHandlerClass)
3737

3838
This class is identical to HTTPServer but uses threads to handle
3939
requests by using the :class:`~socketserver.ThreadingMixIn`. This
@@ -43,7 +43,7 @@ handler. Code to create and run the server looks like this::
4343
.. versionadded:: 3.7
4444

4545

46-
The :class:`HTTPServer` and :class:`ThreadedHTTPServer` must be given
46+
The :class:`HTTPServer` and :class:`ThreadingHTTPServer` must be given
4747
a *RequestHandlerClass* on instantiation, of which this module
4848
provides three different variants:
4949

Lib/http/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
__version__ = "0.6"
8484

8585
__all__ = [
86-
"HTTPServer", "ThreadedHTTPServer", "BaseHTTPRequestHandler",
86+
"HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler",
8787
"SimpleHTTPRequestHandler", "CGIHTTPRequestHandler",
8888
]
8989

@@ -140,7 +140,7 @@ def server_bind(self):
140140
self.server_port = port
141141

142142

143-
class ThreadedHTTPServer(socketserver.ThreadingMixIn, HTTPServer):
143+
class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer):
144144
daemon_threads = True
145145

146146

@@ -1217,7 +1217,7 @@ def run_cgi(self):
12171217

12181218

12191219
def test(HandlerClass=BaseHTTPRequestHandler,
1220-
ServerClass=ThreadedHTTPServer,
1220+
ServerClass=ThreadingHTTPServer,
12211221
protocol="HTTP/1.0", port=8000, bind=""):
12221222
"""Test the HTTP request handler class.
12231223
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
http.server now exposes a ThreadedHTTPServer class and uses it when the
1+
http.server now exposes a ThreadingHTTPServer class and uses it when the
22
module is run with ``-m`` to cope with web browsers pre-opening sockets.

0 commit comments

Comments
 (0)